Thursday, March 8, 2012

Custom library Use

When I had used SQL2K5 Sept. CTP there was an issue using custom .net framework 2.0 library. I had to register the library in GAC + had to copy the dll into .Net framework 2.0 folder structure. I understand why we need to copy the dll on the development box so we can build packages, but why do I need to copy the dll in framework folder for production environment. Should GAC registration be enough?

If this is a feature, what's the purpose of registering the dll in GAC if it requires it to be in folder hierarchy. Especially in .net framework 2.0 so that the reference dialog box can display the component.

The question is if I have custom dll how do I deploy it so that it works with the package? How can I use the same dll in development environment without having to copy it in .net framework folder?

You need to put the DLL in the Framework folder if you are calling it from a script task or script component. You only have to do this on your development workstation.

More info here: http://blogs.conchango.com/jamiethomson/archive/2005/11/02/2341.aspx

-Jamie|||

The DLL should be in Frameworks folder at runtime only if the script task's or component's PreCompile option is set to FALSE. In this case the script is compiled at runtime, and the dependency needs to be in the Frameworks folder due to VSA limitations.

In default case when PreCompile is TRUE, the DLL only needs to be deployed to GAC at runtime.

|||That was it. I found a script task that did not have PreCompile set to True.

Thank you.

No comments:

Post a Comment