Build SSIS Custom Components on TeamBuild
For our SSIS custom components (custom connection managers, custom data sources, custom data transformations, etc.) we have them deployed into the GAC and copied into the appropriate \DTS folder so that they become available in the design tools to be dropped on a design canvas. This is accomplished via the Build Events in Visual Studio:
We also use TFS and TeamBuild for daily builds. We run unit tests on our database stored procs and functions, and on our custom business assemblies. No unit testing on SSIS components yet, but I am interested in what’s happening in this space. The problem we ran into with TeamBuilds on the SSIS custom components is that we didn’t want/need the build events to occur. In fact our TeamBuilds failed because the paths couldn’t be resolved.
To resolve this I opened up the project files and modified the PreBuildEvent and PostBuildEvent tags to include a condition checking if the build was occurring within Visual Studio or not. The tags look like this now:
<PropertyGroup> <PreBuildEvent Condition=”‘$(BuildingInsideVisualStudio)’==’true’”>“$(DevEnvDir)..\..\SDK\v2.0\Bin\gacutil.exe” /f /u “$(TargetPath)” del “C:\Program Files\Microsoft SQL Server\90\DTS\PipelineComponents\$(TargetFileName)”</PreBuildEvent> <PostBuildEvent Condition=”‘$(BuildingInsideVisualStudio)’==’true’”>“$(DevEnvDir)..\..\SDK\v2.0\Bin\gacutil.exe” /if “$(TargetPath)” xcopy “$(TargetPath)” “C:\Program Files\Microsoft SQL Server\90\DTS\PipelineComponents”</PostBuildEvent> </PropertyGroup>