Showing posts with label dll. Show all posts
Showing posts with label dll. Show all posts

Wednesday, March 28, 2012

How do I add a .DLL to my SSIS script task?

Hi,

I have some code written in .NET sitting in a .DLL. I would like to call this code from a script task block of code... but how do I add the .DLL to my project? If I go to References->Add References, there is no "Browse" button like there is in "normal" VS.NET. How can I add this .DLL? So far I have had to copy and paste the code from the .DLL into my project, but this is ugly!!

Thanks for any help.

Hi,

Refer this link: http://sqljunkies.com/WebLog/knight_reign/archive/2005/07/07/16018.aspx

|||

Thanks for your reply. However, I am now having problems trying to just add a .DLL to the GAC! I am following thse steps

1) goto .NET command line and type "sn -k SomeStrongName.snk" (it tells me the key was created)

2) add the this to the top of my code after imports, "<Assembly: AssemblyKeyFile("SomeStrongName.snk")> "

When I try to compile the .dll, it gives this error: "Error creating assembly manifest: Error reading key file 'SomeStrongName.snk' -- The system cannot find the file specified. "

Do you have any clue why this is happening? Is there somehwere i should move this .snk file to? Or do I have to change a path setting or something?

Any help is greatly appreciated!!!


|||I'd say the path is incorrect to the key. From memory something like ..\..\Keyfilename.snk worked best in VS 2003, but in VS 2005 just set the key in the Project Properties, Signing page, it saves all the hassle of specifying the AssembkykeyFile attribute by hand, it does it for you under the covers.

Friday, February 24, 2012

How can I use SMo in VS 2002 SP1 c# applications?

I have got error: cannot add reference to Microsoft.sqlserver.smo.dll .....

I understand VS2005 is bettrer than VS2002 but I have what I have.

Thank you.

You need VS2005 as SMO depends on .NET Framework 2.0.|||

what if i install Framework 2.0 on Visual Studio 2003?