<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>SSIS Team Blog : Extensions</title><link>http://blogs.msdn.com/mattm/archive/tags/Extensions/default.aspx</link><description>Tags: Extensions</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Will converting my script to a custom component make it faster?</title><link>http://blogs.msdn.com/mattm/archive/2009/02/18/will-converting-my-script-to-a-custom-component-make-it-faster.aspx</link><pubDate>Wed, 18 Feb 2009 23:30:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9432381</guid><dc:creator>mmasson</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/mattm/comments/9432381.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mattm/commentrss.aspx?PostID=9432381</wfw:commentRss><description>&lt;p&gt;Recently this question came up on an internal SSIS mailing list:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;We have to process hundreds of thousands of rows through a fairly complex script component. Would converting it to a custom SSIS component give us any performance gain?&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I’ve seen this question come up a couple of times, and I thought it would make a good post. &lt;/p&gt;  &lt;p&gt;The main reason to move from script -&amp;gt; custom component is make re-use and maintenance of the code easier. I wouldn't recommend doing it just for performance reasons.&lt;/p&gt;  &lt;p&gt;People usually see a minor performance gain when making the switch, provided that the component is written properly (minimizing calls to the COM interfaces and caching all metadata in PreExecute() are key!). The nice thing about the Script Component is that it wraps all of the implementation details from you. Custom components don’t have these wrappers, which makes it easier to make coding mistakes that can drastically decrease your performance. &lt;/p&gt;  &lt;p&gt;You would get a performance gain by writing the custom component using native code (C++), as it skips all of the managed layers and interop. I wouldn't recommend it for anything other than really low level operations, however, as the COM interfaces have minimal documentation and can be pretty hard to use.&lt;/p&gt;  &lt;p&gt;You typically get the biggest gain by making sure the code is well written. The quickest way to identify performance bottlenecks it to &lt;a href="http://msdn.microsoft.com/en-us/magazine/cc337887.aspx"&gt;run it through a profiler&lt;/a&gt;. Custom components have an &lt;a href="http://blogs.msdn.com/mattm/archive/2008/11/12/performance-profiling-your-custom-extensions.aspx"&gt;advantage here&lt;/a&gt;, as you can’t hook up a debugger to a script component, but you can achieve the same results by moving your script outside of the SSIS, and unit testing it directly.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9432381" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mattm/archive/tags/Extensions/default.aspx">Extensions</category></item><item><title>How to create an installer for your custom extension</title><link>http://blogs.msdn.com/mattm/archive/2008/12/04/how-to-create-an-installer-for-your-custom-extension.aspx</link><pubDate>Fri, 05 Dec 2008 04:16:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9177737</guid><dc:creator>mmasson</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/mattm/comments/9177737.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mattm/commentrss.aspx?PostID=9177737</wfw:commentRss><description>&lt;p&gt;The simplest way to create an installer for your custom SSIS extension is by using a Setup Project in Visual Studio. Here are the steps we take when we’re creating installers for our &lt;a href="http://www.codeplex.com/SQLSrvIntegrationSrv"&gt;Codeplex projects&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;1. In Visual Studio, create a new Setup Project – File -&amp;gt; New Project…&lt;/p&gt;  &lt;p&gt;2. Under Other Project Types | Setup and Deployment, select Setup Project&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Howtocreateaninstallerforyourcustomexten_B393/clip_image002_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Howtocreateaninstallerforyourcustomexten_B393/clip_image002_thumb.jpg" width="354" height="260" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;3. Delete User’s Desktop and User’s Project Menus folders from File System (Setup) screen&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Howtocreateaninstallerforyourcustomexten_B393/clip_image004_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Howtocreateaninstallerforyourcustomexten_B393/clip_image004_thumb.jpg" width="644" height="481" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;4. On Application Folder, set the DefaultLocation property to the root DTS directory:&lt;/p&gt;  &lt;p&gt;Ex&lt;b&gt;. [ProgramFilesFolder]Microsoft SQL Server\100\DTS&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;5. Right click on the Application Folder and add the sub folder you need to put your sample in (ie. Tasks, PipelineComponents, Connections)&lt;/p&gt;  &lt;p&gt;6. Right click on the new folder, and add “Project Output” to the folder to place binaries from your sample.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Howtocreateaninstallerforyourcustomexten_B393/clip_image006_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image006" border="0" alt="clip_image006" src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Howtocreateaninstallerforyourcustomexten_B393/clip_image006_thumb.jpg" width="644" height="466" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Howtocreateaninstallerforyourcustomexten_B393/clip_image008_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image008" border="0" alt="clip_image008" src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Howtocreateaninstallerforyourcustomexten_B393/clip_image008_thumb.jpg" width="206" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;7. If you need to place files in the GAC, right click on File System on Target Machine -&amp;gt; Add Special Folder -&amp;gt; Global Assembly Cache Folder&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Howtocreateaninstallerforyourcustomexten_B393/clip_image010_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image010" border="0" alt="clip_image010" src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Howtocreateaninstallerforyourcustomexten_B393/clip_image010_thumb.jpg" width="644" height="466" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;It will now show up as an additional folder, and you can add project output to it.&lt;/p&gt;  &lt;p&gt;8. Exclude all dependencies by highlighting all of the files under the Detected Dependencies Folder, and selecting Exclude&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Howtocreateaninstallerforyourcustomexten_B393/clip_image012_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image012" border="0" alt="clip_image012" src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Howtocreateaninstallerforyourcustomexten_B393/clip_image012_thumb.jpg" width="644" height="466" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;9. If you’d like to add a readme .rtf file, place it in the Application Folder.&lt;/p&gt;  &lt;p&gt;10. You’ll need to edit the UI pages to display a readme after the install. Right click on the Setup project, View -&amp;gt; User Interface to bring up the UI page.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Howtocreateaninstallerforyourcustomexten_B393/clip_image014_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image014" border="0" alt="clip_image014" src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Howtocreateaninstallerforyourcustomexten_B393/clip_image014_thumb.jpg" width="644" height="466" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;11. For both the Install and Administrative Install, right click on End and select Add Dialog. Select the Read Me dialog. Drag the “Read Me” page to be above the “Finished” page. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Howtocreateaninstallerforyourcustomexten_B393/clip_image016_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image016" border="0" alt="clip_image016" src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Howtocreateaninstallerforyourcustomexten_B393/clip_image016_thumb.jpg" width="354" height="265" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;12. Set the ReadmeFile property to your readme file.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Howtocreateaninstallerforyourcustomexten_B393/clip_image018_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image018" border="0" alt="clip_image018" src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Howtocreateaninstallerforyourcustomexten_B393/clip_image018_thumb.jpg" width="354" height="259" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9177737" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mattm/archive/tags/Extensions/default.aspx">Extensions</category></item><item><title>Performance profiling your custom extensions</title><link>http://blogs.msdn.com/mattm/archive/2008/11/12/performance-profiling-your-custom-extensions.aspx</link><pubDate>Thu, 13 Nov 2008 04:05:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9064863</guid><dc:creator>mmasson</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/mattm/comments/9064863.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mattm/commentrss.aspx?PostID=9064863</wfw:commentRss><description>&lt;p&gt;The Team Development Edition and Team Suite versions of Visual Studio 2008 comes with a &lt;a href="http://msdn.microsoft.com/en-us/magazine/cc337887.aspx"&gt;performance profiling feature&lt;/a&gt; that can used to find bottlenecks in your custom extensions (tasks, data flow components, etc) for SSIS. Although having your extension assemblies in the GAC make profiling a little more involved, it can still be done with a few additional steps, and I’ve found it to be a very effective way to improve the performance of your code. &lt;/p&gt;  &lt;p&gt;In this post I’ll walk through how to use this tool on a custom Data Source Component (in this case, the source component for the &lt;a href="http://blogs.msdn.com/mattm/archive/2008/09/25/sql-server-data-services-connectors-now-on-codeplex.aspx"&gt;SQL Data Services connectors&lt;/a&gt; on &lt;a href="http://www.codeplex.com/SQLSrvIntegrationSrv/Release/ProjectReleases.aspx?ReleaseId=17658"&gt;Codeplex&lt;/a&gt;).&lt;/p&gt;  &lt;p&gt;The basic steps are:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Configure your extension for debugging&lt;/li&gt;    &lt;li&gt;Create a profile&lt;/li&gt;    &lt;li&gt;Delay sign and disable strong name validation for your extension assembly(s)&lt;/li&gt;    &lt;li&gt;Manually instrument your assembly(s) and add them to the GAC&lt;/li&gt;    &lt;li&gt;Run the profile&lt;/li&gt;    &lt;li&gt;Enjoy the results&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Read on for more details.&lt;/p&gt;  &lt;h5&gt;Configure your extension for debugging&lt;/h5&gt;  &lt;p&gt;The first step is to setup your extension project to be easy to debug. &lt;/p&gt;  &lt;p&gt;1. Create an SSIS package which makes use of your extension.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Performanceprofilingyourcustomextensions_7769/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Performanceprofilingyourcustomextensions_7769/image_thumb_1.png" width="552" height="484" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I’ve created a simple package which uses the SSDS Source, and pipes it to a row count transform. &lt;/p&gt;  &lt;p&gt;2. Open the solution for your extension. Right click on the Project, and configure the debugging settings to launch the package using dtexec.exe.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Performanceprofilingyourcustomextensions_7769/image_8.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Performanceprofilingyourcustomextensions_7769/image_thumb_3.png" width="630" height="484" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Using dtexec to run your package makes it a lot easier to debug than it would be running it inside of BIDS. If you’re on a 64bit platform, be sure to select the 32bit version of dtexec (under Program Files (x86)), as the performance profiler has issues with 64bit executions.&lt;/p&gt;  &lt;p&gt;Specify the path to your package using the /f switch. If you need to specify other command line parameters, you can use &lt;a href="http://msdn.microsoft.com/en-us/library/ms141707(sql.90).aspx"&gt;dtexecui&lt;/a&gt; to build your command line for you.&lt;/p&gt;  &lt;p&gt;Once you have your project configured for debugging&lt;/p&gt;  &lt;h5&gt;Configuring the Performance Profiler&lt;/h5&gt;  &lt;p&gt;1. Launch the Performance Wizard (Analyze –&amp;gt; Launch Performance Wizard…)&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Performanceprofilingyourcustomextensions_7769/image_10.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Performanceprofilingyourcustomextensions_7769/image_thumb_4.png" width="565" height="484" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;2. Select your extension project, and click next.&lt;/p&gt;  &lt;p&gt;3. On the next page you can select the type of profiling you’d like to do. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Performanceprofilingyourcustomextensions_7769/image_12.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Performanceprofilingyourcustomextensions_7769/image_thumb_5.png" width="565" height="484" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Both can be useful, but “Instrumentation” will give you a detailed report of which functions are being called most, and how much time is being spent in them. For SSIS extensions, this is probably what you’ll want to see. &lt;/p&gt;  &lt;p&gt;After finishing the wizard, you’ll see the Performance Explorer window, with a new Target added for your project. If your extension relies on additional assemblies, you’d add them as additional targets by right clicking on the Targets folder, and selecting one of the Add options. In my case, the SSDS Source component makes heavy use of a Connectivity layer assembly. To get a full performance profile, I’ll instrument both of them.&lt;/p&gt;  &lt;h5&gt;Instrumenting your assemblies&lt;/h5&gt;  &lt;p&gt;If you tried to do a profiled run now (by clicking the Launch with Profiling button, or Analyze –&amp;gt; Profiler –&amp;gt; Launch with Profiling from the menu), you’d get the following warning dialog:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Performanceprofilingyourcustomextensions_7769/image_14.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Performanceprofilingyourcustomextensions_7769/image_thumb_6.png" width="404" height="176" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;When running in Instrumentation mode, the profile will need to modify your assembly to insert the hooks it needs. This will invalidate the signature on your assembly. This becomes an issue if your assembly needs to be in the GAC (like with SSIS), as the GAC will only accept properly signed assemblies. &lt;/p&gt;  &lt;p&gt;If you click ok and run anyways, dtexec will run without error, but no data will be collected because your extension assembly in the GAC wasn’t profiled. &lt;/p&gt;  &lt;p&gt;To get around this, we’ll need to do a few things. &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Delay sign our assemblies&lt;/li&gt;    &lt;li&gt;Disable strong name validation for your assembly&lt;/li&gt;    &lt;li&gt;Manually instrument the assembly(s) using the vsinstr.exe application&lt;/li&gt;    &lt;li&gt;Add the instrumented assemblies to the GAC&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;To delay sign the assembly, check the “Delay sign only” box on the Signing tab of the project properties page for your extension project. Do the same for any other extensions required by your &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Performanceprofilingyourcustomextensions_7769/image_16.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Performanceprofilingyourcustomextensions_7769/image_thumb_7.png" width="644" height="464" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;To disable strong name verification for your assembly (which should only be done in your dev/test environment, and never in production) we’ll use the &lt;a href="http://msdn.microsoft.com/en-us/library/k5b5tt23.aspx"&gt;Strong Name Tool&lt;/a&gt; (sn.exe) which comes with the .NET framework SDK. If you’ve installed SQL Server 2008 on your machine, you’ll find it under C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin.&lt;/p&gt;  &lt;p&gt;From the command line (must be elevated on Vista), run &lt;strong&gt;sn.exe -Vr &amp;lt;extension&amp;gt;.dll&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;C:\code\source\bin\release&amp;gt;sn -Vr Microsoft.Samples.DataServices.Source.dll &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;Microsoft (R) .NET Framework Strong Name Utility&amp;#160; Version 2.0.50727.1433     &lt;br /&gt;Copyright (c) Microsoft Corporation.&amp;#160; All rights reserved. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;Verification entry added for assembly 'Microsoft.Samples.DataServices.Source,DA625E43F8E8D37E'&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Next we’ll instrument our assembly(s) using the vsinstr.exe tool. From the command line, run &lt;strong&gt;vsinstr.exe &amp;lt;extension&amp;gt;.dll&lt;/strong&gt; &lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;C:\code\source\bin\release&amp;gt;vsinstr.exe Microsoft.Samples.DataServices.Source.dll     &lt;br /&gt;Microsoft (R) VSInstr Post-Link Instrumentation 9.0.30729 x86      &lt;br /&gt;Copyright (C) Microsoft Corp. All rights reserved. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;File to Process:     &lt;br /&gt;&amp;#160;&amp;#160; C:\code\source\bin\release\Microsoft.Samples.DataServices.Source.dll --&amp;gt;      &lt;br /&gt;C:\code\source\bin\release\Microsoft.Samples.DataServices.Source.dll      &lt;br /&gt;Original file backed up to C:\code\source\bin\release\Microsoft.Samples.DataServices.Source.dll.orig &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;Warning VSP2001 : C:\code\source\bin\release\Microsoft.Samples.DataServices.     &lt;br /&gt;Source.dll is a strongly named assembly.&amp;#160; It will need to be re-signed before it can be executed.      &lt;br /&gt;Successfully instrumented file C:\code\source\bin\release\Microsoft.Samples.DataServices.Source.dll.      &lt;br /&gt;Warning VSP2013 : Instrumenting this image requires it to run as a 32-bit process.&amp;#160; The CLR header flags have been updated to reflect this.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Now add the instrumented assembly to the GAC. This can be done using the &lt;a href="http://msdn.microsoft.com/en-us/library/ex0ss12c.aspx"&gt;Global Assembly Cache Tool&lt;/a&gt; (gacutil.exe), which can be found in the same directory as sn.exe. From the command line, run &lt;strong&gt;gacutil.exe /i &amp;lt;extension&amp;gt;.dll&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;C:\code\source\bin\release&amp;gt;gacutil /i Microsoft.Samples.DataServices.Source.dll &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;Microsoft (R) .NET Global Assembly Cache Utility.&amp;#160; Version 2.0.50727.1433     &lt;br /&gt;Copyright (c) Microsoft Corporation.&amp;#160; All rights reserved. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;Assembly successfully added to the cache&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;These steps should be repeated for each assembly you’d like to profile.&lt;/p&gt;  &lt;p&gt;Note: since you’ll most likely need to run the profiling more than once, I’d suggest you create a batch file which runs the VS instrumentation tool and adds the files to the GAC. &lt;/p&gt;  &lt;h5&gt;Launching with profiling&lt;/h5&gt;  &lt;p&gt;Once the instrumented assemblies have been placed in the GAC, you can run launch a profiled run (click the Launch with Profiling button, or Analyze –&amp;gt; Profiler –&amp;gt; Launch with Profiling from the menu). You’ll still get an instrumentation warning, but this time when you click ok, you’ll get the profiling results. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Performanceprofilingyourcustomextensions_7769/image_18.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Performanceprofilingyourcustomextensions_7769/image_thumb_8.png" width="641" height="484" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;From the summary page you can drill down to see which functions are being called most, and which are taking the most time. From there you can begin to optimize your code and fix your bottlenecks.&lt;/p&gt;  &lt;p&gt;Remember that you need to re-instrument and re-GAC your assembly anytime you modify it. &lt;/p&gt;  &lt;p&gt;Be sure to check out the &lt;a href="http://msdn.microsoft.com/en-us/magazine/cc337887.aspx"&gt;Performance Profiler MSDN article&lt;/a&gt; for more details on the features of the profiler.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9064863" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mattm/archive/tags/Performance/default.aspx">Performance</category><category domain="http://blogs.msdn.com/mattm/archive/tags/Extensions/default.aspx">Extensions</category></item><item><title>Creating a custom task with a default UI</title><link>http://blogs.msdn.com/mattm/archive/2008/07/18/creating-a-custom-task-with-a-default-ui.aspx</link><pubDate>Sat, 19 Jul 2008 04:20:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8752636</guid><dc:creator>mmasson</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/mattm/comments/8752636.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mattm/commentrss.aspx?PostID=8752636</wfw:commentRss><description>&lt;p&gt;The &lt;a href="http://msdn.microsoft.com/en-us/library/ms136080.aspx"&gt;Developing a User Interface for a Custom Task&lt;/a&gt; entry in Books Online describes how to build your UI from scratch, but there is an easier way to create a UI that has the same look and feel as the stock tasks that ship with SSIS. &lt;/p&gt;  &lt;p&gt;The Microsoft.DataTransformationServices.Controls assembly exposes a base class that most of the stock SSIS tasks inherit from – &lt;strong&gt;DTSBaseTaskUI&lt;/strong&gt;. With minimal coding, you too can have a beautiful Task UI (that looks something like this:)&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Creatingacustomtask_A5FF/image_4.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="454" alt="image" src="http://blogs.msdn.com/blogfiles/mattm/WindowsLiveWriter/Creatingacustomtask_A5FF/image_thumb_1.png" width="537" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;After &lt;a href="http://msdn.microsoft.com/en-us/library/ms135896.aspx"&gt;creating your task&lt;/a&gt;, you can link it to a UI assembly using the UITypeName parameter of the DtsTask property. The recommended practice is to create a separate assembly for your UI to separate the UI code from the code that gets loaded at runtime, but this is optional. It can all work in the same assembly as well.&lt;/p&gt;  &lt;p&gt;We’re going to create three classes for our “HelloWorldTask”&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;HelloWorldTaskUI – Implements &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.dts.runtime.design.idtstaskui.aspx"&gt;IDtsTaskUI&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;HelloWorldTaskMainWnd – Extends DTSBaseTaskUI&lt;/li&gt;    &lt;li&gt;GeneralView – Implements IDTSTaskUIView&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;HelloWorldTaskUI is the entry point for the UI functionality, and is responsible for initializing and displaying your UI. &lt;/p&gt;  &lt;p&gt;Extending DTSBaseTaskUI in HelloWorldTaskMainWnd gives you the form in the screen shot above. Each page of properties you want to display is a separate class that implements IDTSTaskUIView. You get the “Expressions” page for free.&lt;/p&gt;  &lt;p&gt;Let’s walk through what you need to do.&lt;/p&gt;  &lt;p&gt;First you’ll need to add some additional references:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Microsoft.DataTransformationServices.Controls&lt;/li&gt;    &lt;li&gt;Microsoft.SqlServer.Dts.Design&lt;/li&gt;    &lt;li&gt;System.Drawing&lt;/li&gt;    &lt;li&gt;System.Windows.Forms&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Note, that Microsoft.DataTransformationServices.Controls.dll is in the GAC, but doesn’t show up in the “.NET” tab of the “Add Reference…” dialog.&lt;/p&gt;  &lt;p&gt;Add new User Control – GeneralView.cs. On the designer, add a property grid. To keep the same look and feel as other SSIS tasks, the InitializeComponents() should look something like this:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: green"&gt;// 
// propertyGrid
// 
&lt;/span&gt;&lt;span style="color: blue"&gt;this&lt;/span&gt;.propertyGrid.Dock = System.Windows.Forms.&lt;span style="color: #2b91af"&gt;DockStyle&lt;/span&gt;.Fill;
&lt;span style="color: blue"&gt;this&lt;/span&gt;.propertyGrid.Location = &lt;span style="color: blue"&gt;new &lt;/span&gt;System.Drawing.&lt;span style="color: #2b91af"&gt;Point&lt;/span&gt;(0, 0);
&lt;span style="color: blue"&gt;this&lt;/span&gt;.propertyGrid.Name = &lt;span style="color: #a31515"&gt;&amp;quot;propertyGrid&amp;quot;&lt;/span&gt;;
&lt;span style="color: blue"&gt;this&lt;/span&gt;.propertyGrid.PropertySort = System.Windows.Forms.&lt;span style="color: #2b91af"&gt;PropertySort&lt;/span&gt;.Categorized;
&lt;span style="color: blue"&gt;this&lt;/span&gt;.propertyGrid.Size = &lt;span style="color: blue"&gt;new &lt;/span&gt;System.Drawing.&lt;span style="color: #2b91af"&gt;Size&lt;/span&gt;(150, 150);
&lt;span style="color: blue"&gt;this&lt;/span&gt;.propertyGrid.TabIndex = 0;
&lt;span style="color: blue"&gt;this&lt;/span&gt;.propertyGrid.ToolbarVisible = &lt;span style="color: blue"&gt;false&lt;/span&gt;;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;In your GeneralView class, define an internal class which contains all of the properties you’d like to display in the UI – ie. GeneralViewNode&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;internal class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;GeneralViewNode
&lt;/span&gt;{
    &lt;span style="color: green"&gt;// Properties variables
    &lt;/span&gt;&lt;span style="color: blue"&gt;private string &lt;/span&gt;displayText = &lt;span style="color: blue"&gt;string&lt;/span&gt;.Empty;
    &lt;span style="color: blue"&gt;private string &lt;/span&gt;name = &lt;span style="color: blue"&gt;string&lt;/span&gt;.Empty;
    &lt;span style="color: blue"&gt;private string &lt;/span&gt;description = &lt;span style="color: blue"&gt;string&lt;/span&gt;.Empty;

    &lt;span style="color: blue"&gt;internal &lt;/span&gt;&lt;span style="color: #2b91af"&gt;TaskHost &lt;/span&gt;taskHost = &lt;span style="color: blue"&gt;null&lt;/span&gt;;
    &lt;span style="color: blue"&gt;internal &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IDtsConnectionService &lt;/span&gt;connectionService = &lt;span style="color: blue"&gt;null&lt;/span&gt;;

    &lt;span style="color: blue"&gt;internal &lt;/span&gt;GeneralViewNode(&lt;span style="color: #2b91af"&gt;TaskHost &lt;/span&gt;taskHost, &lt;span style="color: #2b91af"&gt;IDtsConnectionService &lt;/span&gt;connectionService)
    {
        &lt;span style="color: blue"&gt;this&lt;/span&gt;.taskHost = taskHost;
        &lt;span style="color: blue"&gt;this&lt;/span&gt;.connectionService = connectionService;

        &lt;span style="color: green"&gt;// Extract common values from the Task Host
        &lt;/span&gt;name = taskHost.Name;
        description = taskHost.Description;

        &lt;span style="color: green"&gt;// Extract values from the task object
        &lt;/span&gt;HelloWorldTask.&lt;span style="color: #2b91af"&gt;HelloWorldTask &lt;/span&gt;task = taskHost.InnerObject &lt;span style="color: blue"&gt;as &lt;/span&gt;HelloWorldTask.&lt;span style="color: #2b91af"&gt;HelloWorldTask&lt;/span&gt;;
        &lt;span style="color: blue"&gt;if &lt;/span&gt;(task == &lt;span style="color: blue"&gt;null&lt;/span&gt;)
        {
            &lt;span style="color: blue"&gt;string &lt;/span&gt;msg = &lt;span style="color: blue"&gt;string&lt;/span&gt;.Format(&lt;span style="color: #a31515"&gt;&amp;quot;Type mismatch for taskHost inner object.&amp;quot;&lt;/span&gt;);
            &lt;span style="color: blue"&gt;throw new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ArgumentException&lt;/span&gt;(msg);
        }

        displayText = task.DisplayText;
    }

    &lt;span style="color: blue"&gt;#region &lt;/span&gt;Properties

    [&lt;span style="color: #2b91af"&gt;Category&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;General&amp;quot;&lt;/span&gt;), &lt;span style="color: #2b91af"&gt;Description&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;Task name&amp;quot;&lt;/span&gt;)]
    &lt;span style="color: blue"&gt;public string &lt;/span&gt;Name
    {
        &lt;span style="color: blue"&gt;get
        &lt;/span&gt;{
            &lt;span style="color: blue"&gt;return &lt;/span&gt;name;
        }
        &lt;span style="color: blue"&gt;set
        &lt;/span&gt;{
            &lt;span style="color: blue"&gt;string &lt;/span&gt;v = &lt;span style="color: blue"&gt;value&lt;/span&gt;.Trim();
            &lt;span style="color: blue"&gt;if &lt;/span&gt;(&lt;span style="color: blue"&gt;string&lt;/span&gt;.IsNullOrEmpty(v))
            {
                &lt;span style="color: blue"&gt;throw new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ApplicationException&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;Task name cannot be empty&amp;quot;&lt;/span&gt;);
            }
            name = v;
        }
    }

    [&lt;span style="color: #2b91af"&gt;Category&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;General&amp;quot;&lt;/span&gt;), &lt;span style="color: #2b91af"&gt;Description&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;Task description&amp;quot;&lt;/span&gt;)]
    &lt;span style="color: blue"&gt;public string &lt;/span&gt;Description
    {
        &lt;span style="color: blue"&gt;get
        &lt;/span&gt;{
            &lt;span style="color: blue"&gt;return &lt;/span&gt;description;
        }
        &lt;span style="color: blue"&gt;set
        &lt;/span&gt;{
            description = &lt;span style="color: blue"&gt;value&lt;/span&gt;.Trim();
        }
    }

    [&lt;span style="color: #2b91af"&gt;Category&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;General&amp;quot;&lt;/span&gt;), &lt;span style="color: #2b91af"&gt;Description&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;Text to display&amp;quot;&lt;/span&gt;)]
    &lt;span style="color: blue"&gt;public string &lt;/span&gt;DisplayText
    {
        &lt;span style="color: blue"&gt;get
        &lt;/span&gt;{
            &lt;span style="color: blue"&gt;return &lt;/span&gt;displayText;
        }
        &lt;span style="color: blue"&gt;set
        &lt;/span&gt;{
            displayText = &lt;span style="color: blue"&gt;value&lt;/span&gt;;
        }
    }

    &lt;span style="color: blue"&gt;#endregion
&lt;/span&gt;}&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;As you can see, we have the single property for the task (DisplayText), and two of the common Task properties – Name, and Description.&lt;/p&gt;

&lt;p&gt;Create a member variable for this node class:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;private &lt;/span&gt;&lt;span style="color: #2b91af"&gt;GeneralViewNode &lt;/span&gt;generalNode;
&lt;span style="color: blue"&gt;internal &lt;/span&gt;&lt;span style="color: #2b91af"&gt;GeneralViewNode &lt;/span&gt;GeneralNode
{
    &lt;span style="color: blue"&gt;get &lt;/span&gt;{ &lt;span style="color: blue"&gt;return &lt;/span&gt;generalNode; }
}&lt;/pre&gt;

&lt;p&gt;Implement the IDTSTaskUIView interface. These methods are called when the UI is opened, and when the UI clicks OK.&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;#region &lt;/span&gt;IDTSTaskUIView Members

&lt;span style="color: blue"&gt;public void &lt;/span&gt;OnCommit(&lt;span style="color: blue"&gt;object &lt;/span&gt;taskHost)
{
    &lt;span style="color: #2b91af"&gt;TaskHost &lt;/span&gt;host = taskHost &lt;span style="color: blue"&gt;as &lt;/span&gt;&lt;span style="color: #2b91af"&gt;TaskHost&lt;/span&gt;;
    &lt;span style="color: blue"&gt;if &lt;/span&gt;(host == &lt;span style="color: blue"&gt;null&lt;/span&gt;)
        &lt;span style="color: blue"&gt;throw new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ArgumentException&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;Arugment is not a TaskHost.&amp;quot;&lt;/span&gt;, &lt;span style="color: #a31515"&gt;&amp;quot;taskHost&amp;quot;&lt;/span&gt;);

    HelloWorldTask.&lt;span style="color: #2b91af"&gt;HelloWorldTask &lt;/span&gt;task = host.InnerObject &lt;span style="color: blue"&gt;as &lt;/span&gt;HelloWorldTask.&lt;span style="color: #2b91af"&gt;HelloWorldTask&lt;/span&gt;;
    &lt;span style="color: blue"&gt;if &lt;/span&gt;(task == &lt;span style="color: blue"&gt;null&lt;/span&gt;)
    {
        &lt;span style="color: blue"&gt;throw new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ArgumentException&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;Arugment is not a HelloWorldTask.&amp;quot;&lt;/span&gt;, &lt;span style="color: #a31515"&gt;&amp;quot;taskHost&amp;quot;&lt;/span&gt;);
    }

    host.Name = generalNode.Name;
    host.Description = generalNode.Description;

    &lt;span style="color: green"&gt;// Task properties
    &lt;/span&gt;task.DisplayText = generalNode.DisplayText;
}

&lt;span style="color: blue"&gt;public void &lt;/span&gt;OnInitialize(&lt;span style="color: #2b91af"&gt;IDTSTaskUIHost &lt;/span&gt;treeHost, &lt;span style="color: #2b91af"&gt;TreeNode &lt;/span&gt;viewNode, &lt;span style="color: blue"&gt;object &lt;/span&gt;taskHost, &lt;span style="color: blue"&gt;object &lt;/span&gt;connections)
{
    &lt;span style="color: blue"&gt;this&lt;/span&gt;.generalNode = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;GeneralViewNode&lt;/span&gt;(taskHost &lt;span style="color: blue"&gt;as &lt;/span&gt;&lt;span style="color: #2b91af"&gt;TaskHost&lt;/span&gt;, connections &lt;span style="color: blue"&gt;as &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IDtsConnectionService&lt;/span&gt;);
    &lt;span style="color: blue"&gt;this&lt;/span&gt;.propertyGrid.SelectedObject = generalNode;
}

&lt;span style="color: blue"&gt;public void &lt;/span&gt;OnLoseSelection(&lt;span style="color: blue"&gt;ref bool &lt;/span&gt;bCanLeaveView, &lt;span style="color: blue"&gt;ref string &lt;/span&gt;reason)
{
}

&lt;span style="color: blue"&gt;public void &lt;/span&gt;OnSelection()
{
}

&lt;span style="color: blue"&gt;public void &lt;/span&gt;OnValidate(&lt;span style="color: blue"&gt;ref bool &lt;/span&gt;bViewIsValid, &lt;span style="color: blue"&gt;ref string &lt;/span&gt;reason)
{
}

&lt;span style="color: blue"&gt;#endregion&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Add new Windows Form – HelloWorldTaskMainWnd.cs. Change the inheritance from Form to DTSBaseTaskUI. &lt;/p&gt;

&lt;p&gt;Note, after inheriting from DTSBaseTaskUI, you’ll get an error when trying to open the code in Design view in Visual Studio 2008. This is caused by DTSBaseTaskUI not having a default constructor. We’re aware of the issue, and will hopefully be able to resolve it in a cumulative update. It won’t cause issues at runtime.&lt;/p&gt;

&lt;p&gt;Add some members for the UI properties we’ll use to initialize DTSBaseTaskUI. &lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;private const string &lt;/span&gt;Title = &lt;span style="color: #a31515"&gt;&amp;quot;Hello World Task&amp;quot;&lt;/span&gt;;
&lt;span style="color: blue"&gt;private const string &lt;/span&gt;Description = &lt;span style="color: #a31515"&gt;&amp;quot;Displays a message box&amp;quot;&lt;/span&gt;;
&lt;span style="color: blue"&gt;private static &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Icon &lt;/span&gt;TaskIcon = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Icon&lt;/span&gt;(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;HelloWorldTask&lt;/span&gt;), &lt;span style="color: #a31515"&gt;&amp;quot;Task.ico&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;Add a member for GeneralView class.&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;private &lt;/span&gt;&lt;span style="color: #2b91af"&gt;GeneralView &lt;/span&gt;generalView;
&lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af"&gt;GeneralView &lt;/span&gt;GeneralView
{
    &lt;span style="color: blue"&gt;get &lt;/span&gt;{ &lt;span style="color: blue"&gt;return &lt;/span&gt;generalView; }
}&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;Add a constructor.&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public &lt;/span&gt;HelloWorldTaskUIMainWnd(&lt;span style="color: #2b91af"&gt;TaskHost &lt;/span&gt;taskHost, &lt;span style="color: blue"&gt;object &lt;/span&gt;connections) :
    &lt;span style="color: blue"&gt;base&lt;/span&gt;(Title, TaskIcon, Description, taskHost, connections)
{
    InitializeComponent();
    
    &lt;span style="color: green"&gt;// Setup our views
    &lt;/span&gt;generalView = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;GeneralView&lt;/span&gt;();
    &lt;span style="color: blue"&gt;this&lt;/span&gt;.DTSTaskUIHost.FastLoad = &lt;span style="color: blue"&gt;false&lt;/span&gt;;
    &lt;span style="color: blue"&gt;this&lt;/span&gt;.DTSTaskUIHost.AddView(&lt;span style="color: #a31515"&gt;&amp;quot;General&amp;quot;&lt;/span&gt;, generalView, &lt;span style="color: blue"&gt;null&lt;/span&gt;);
    &lt;span style="color: blue"&gt;this&lt;/span&gt;.DTSTaskUIHost.FastLoad = &lt;span style="color: blue"&gt;true&lt;/span&gt;;
}&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;Note, the first parameter you use for AddView() is the text that gets displayed on the left of the main window.&lt;/p&gt;

&lt;p&gt;Finally, add a new class that implements IDtsTaskUI to control the launching of your new window.&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;HelloWorldTaskUI &lt;/span&gt;: &lt;span style="color: #2b91af"&gt;IDtsTaskUI
&lt;/span&gt;{
    &lt;span style="color: blue"&gt;private &lt;/span&gt;&lt;span style="color: #2b91af"&gt;TaskHost &lt;/span&gt;taskHost = &lt;span style="color: blue"&gt;null&lt;/span&gt;;
    &lt;span style="color: blue"&gt;private &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IDtsConnectionService &lt;/span&gt;connectionService = &lt;span style="color: blue"&gt;null&lt;/span&gt;;

    &lt;span style="color: blue"&gt;#region &lt;/span&gt;IDtsTaskUI Members

    &lt;span style="color: blue"&gt;public void &lt;/span&gt;Delete(&lt;span style="color: #2b91af"&gt;IWin32Window &lt;/span&gt;parentWindow)
    {
    }

    &lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ContainerControl &lt;/span&gt;GetView()
    {
        &lt;span style="color: blue"&gt;return new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;HelloWorldTaskUIMainWnd&lt;/span&gt;(taskHost, connectionService);
    }

    &lt;span style="color: blue"&gt;public void &lt;/span&gt;Initialize(&lt;span style="color: #2b91af"&gt;TaskHost &lt;/span&gt;taskHost, &lt;span style="color: #2b91af"&gt;IServiceProvider &lt;/span&gt;serviceProvider)
    {
        &lt;span style="color: blue"&gt;this&lt;/span&gt;.taskHost = taskHost;
        &lt;span style="color: blue"&gt;this&lt;/span&gt;.connectionService = serviceProvider.GetService(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;IDtsConnectionService&lt;/span&gt;)) &lt;span style="color: blue"&gt;as &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IDtsConnectionService&lt;/span&gt;;
    }

    &lt;span style="color: blue"&gt;public void &lt;/span&gt;New(&lt;span style="color: #2b91af"&gt;IWin32Window &lt;/span&gt;parentWindow)
    {
    }

    &lt;span style="color: blue"&gt;#endregion
&lt;/span&gt;}&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;And there you go! Be sure to add the task UI assembly to the GAC before trying it out in Visual Studio. &lt;/p&gt;

&lt;p&gt;I should mention that &lt;a href="http://www.amazon.com/gp/product/0672327813/ref=sr_11_1/104-2063177-2650333?redirect=true&amp;amp;%5Fencoding=UTF8"&gt;Kirk’s book&lt;/a&gt; has a chapter on creating custom tasks that gives a lot more details than I have here. If you’re interested in extending the SSIS platform, Kirk’s book (or the “SSIS White Book” as I like to call it) is an invaluable resource.&lt;/p&gt;

&lt;p&gt;I’ve uploaded the source for the highly useful Hello World Task (and its UI) to my Sky Drive public folder. I developed this using SQL Server 2008, but it should also work the same way in 2005.&lt;/p&gt;

&lt;p&gt;&lt;iframe style="border-right: #dde5e9 1px solid; padding-right: 0px; border-top: #dde5e9 1px solid; padding-left: 0px; padding-bottom: 0px; margin: 3px; border-left: #dde5e9 1px solid; width: 240px; padding-top: 0px; border-bottom: #dde5e9 1px solid; height: 66px; background-color: #ffffff" marginwidth="0" marginheight="0" src="http://cid-2aeb3aa8bb4bd9fd.skydrive.live.com/embedrowdetail.aspx/Public/HelloWorldTask.zip" frameborder="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;/p&gt;

&lt;p&gt;I’ll also be turning this into a community sample to be published on &lt;a href="http://www.codeplex.com/"&gt;Codeplex&lt;/a&gt; (along with our other new development samples) sometime soon.&lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8752636" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mattm/archive/tags/Samples/default.aspx">Samples</category><category domain="http://blogs.msdn.com/mattm/archive/tags/Extensions/default.aspx">Extensions</category></item></channel></rss>