by following this way can can create your own task very easily. also i have uploaded the solution folder, so you can modify it to create your own one.
also see my other posts to know more about SSIS custom task like a UI, Tabs on UI, Icon for your custom task etc..
Theory (be patience..)
Follow below 5 simple steps..
- create a blank project (.dll/library type project)
- add some fixed code/reference, you can say header. (Image-"Blank Project with Task Info")
- override 3 procedures of inherited class "Task". (Image - "Override Procedures")
- prepare get/set for input/output variables -- [this will be available in the expression option of SSIS task property!] (Image - "get-set")
- create a strong key for this dll and attache with it! (Image - "Strong Name Key")
- Install it (see my post)
- Add Icon to this Task
STEP 1: create a blank "Class Library" application in visual studio. for example "Test_Task".
STEP 2: add some fixed code, you can say header.
- Add Reference : add reference "Microsoft.SQLServer.ManagedDTS". you can find it on sql-server installed location ... "..\100\SDK\Assemblies\*.dll" (my case)
- Use Reference: add on top "using Microsoft.Sqlserver.Dts.Runtime;"
- Add Task Info:
STEP 3: override 3 procedures
- Inherit the class "Task"
- declare a variable to use .. my case - "private string text="Hello World SSIS...";"
- Now override 3 procedures of Task class .. Validate, InitilizeTask & Execute
- add code of lines from the image "override procedures".
- you can modify as you want
Override Procedures |
STEP 4: prepare get/set for input/output variables
- prepare get-set for your variables ... see image "get-set"
- in my case this is "public string TestInput { get { return this.txet;} set { this.txet = value;}}"
get-set |
- NOW BUILD the SOLUTION
- a .dll file will be available in the debug OR release folder. thats out required .dll file :)
- go to "project properties". [on solution explorer ->right click on solution-> click properties]
- click -> "Signing" tab
- check "Sign the assembly"
- select "<New>.." [new window will open]
- un-check "Protect .. Password"
- give a name for you Stron Name Key (.snk) file in "Key file name".. my case "Test_Task"
- click "OK"
- a new item (.snk file) will be available (at bottom) in the "solution explorer". my case "Test_Task.snk"
- save the solution (ctrl+s)
- NOW BUILD the SOLUTION
- now the dll is ready to install in GAC .. check my post to install this dll as SSIS Task
Strong Name Key |
Nothing Is Bug …: Create Ssis Custom Task With Complete Example >>>>> Download Now
ReplyDelete>>>>> Download Full
Nothing Is Bug …: Create Ssis Custom Task With Complete Example >>>>> Download LINK
>>>>> Download Now
Nothing Is Bug …: Create Ssis Custom Task With Complete Example >>>>> Download Full
>>>>> Download LINK