Welcome to blogs.conchango.com Sign in | Join | Help

Welcome to blogs.conchango.com

SSIS Junkie

SSIS: VSA requires DLLs to be in the Microsoft.Net folder (but not all the time)

Recently I have been using the SSIS Script Task and Script Component quite heavily. For those that don't know, these items use Visual Studio for Applications (VSA) under the covers.

There is a peculiar limitation of VSA that requires you to place any DLLs that you want to reference into the Microsoft.Net\Framework folder of your machine - it isn't enough to GAC it.

Happily this only needs to be done on development machines because this is a design-time requirement. When the VSA apps run they use DLLs in the GAC - they don't need to be in the Microsoft.Net\Framework folder. Or so it seems to me anyway. To prove this I changed the name of my DLL in the Microsoft.Net\Framework folder and sure enough I got design-time errors but my packages containing script tasks/components that referenced that DLL still ran successfully. One caveat - this will only work if the script is pre-compiled - so make sure the PreCompile setting on your script task/component is set to TRUE.

-Jamie

 

UPDATE 2007-04-22: Michael Entin has provided more useful information here: http://blogs.msdn.com/michen/archive/2007/04/22/com-references-within-an-ssis-script-component.aspx regarding how to build interop assemblies for COM components. Very useful stuff.

Published 02 November 2005 10:25 by jamie.thomson

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

SSIS Junkie said:

"Why the <insert your favourite expletive here> doesn't SSIS support C# for the script

June 10, 2007 22:45
 

epikto said:

This was an excellent suggestion and has just saved my bacon.  Thanks!

September 30, 2007 01:17
 

David Hawes said:

You can also manually edit the *.dtsx script file in notepad to add additional paths to look for you defined assemblies. So put your own folder in the ReferencePath attribute, for example:

<Build>

<Settings ... ReferencePath="C:\mycustomassembly\;....>

Then you can define you assemblies in the References Tags a little further down:

<References>

<Reference Name="DaveAssembly" AssemblyName="DaveAssembly" />

Next time you fire up the script in Visual Studio of Applications it will be referencing

C:\mycusomassembly\DaveAssembly.dll

------------------------------

<rant>

This is the first time I've looked into SSIS and am very disappointed with the support it provides for custom assemblies. Having to deploy to the GAC and hacking config files for developement just seems totally crazy and looses a lot of the great stuff you can do in .net. Lets hope than in future there will be some tools to create MSI files for deployment similiar to what you can do in Biztalk 2006 (and even use c# ???).

</rant>

November 9, 2007 10:09
 

Shep said:

I've got a C#-written dll loaded in the GAC.

I'm trying to import it inside an SSIS script task, but it does not show..

Can somebody help...

January 22, 2008 11:56
 

eakmeemana said:

great info mate!!! hit a brick wall with this issue. this saved me lot of time.

July 18, 2008 07:44
 

Bishal said:

hi

jamie i am trying to do same thing as said above i was trying to add microsoft word dll to do mail merging task through script task but i did not find a com component in a reference list and i have done what is said it in the above link u have posted.Can u help me how to add a comcomponent to access the microsoft office word application in ssis script task

July 30, 2008 15:28

Leave a Comment

(required) 
(optional)
(required) 
Submit

This Blog

Syndication

Powered by Community Server (Personal Edition), by Telligent Systems