views:

315

answers:

4

I want to use a assembly in a SSIS task. However, it is unsigned and third-party. Therefore, I can't GAC it. What workarounds are available?

A: 

None to my knowledge. We ran into this issue recently and wound up disassembling (ildasm), signing and reassembling (ilasm). We also tried to work with the vendor to get them to sign their assembly, but they would not. We would up dropping that vendor and using another that was more friendly to a realistic deployment scenario. I hope you find a better way. :)

JP Alioto
A: 

You're going to have a lot of fun, and by that I mean pain.

About the only workaround I can think of is to create your own, signed assembly, and use it to load the unsigned assembly at runtime.

Randolpho
You cannot load unsigned assemblies in signed assemblies. Whoops, unless you are doing something really fishy.
Cheeso
I'm 99.5% certain that you *can* load unsigned assemblies from a signed assembly *at runtime*. Now, I grant you, it's fishy. He needs a workaround to use his third-party library. But it *can* be done.
Randolpho
+2  A: 

There is an answer. Disassmble, then re-assemble and sign the assembly with your key. Prolly wanna check with your 3rd party to see if this kind of surgery is allowed by the license.

The details: Can I sign an assembly for which I do not have source code?

Cheeso
A: 

The only workaround is to copy it to home directories of all the application that will design and run this package.

Usually, it is enough to copy to 1) location of VS IDE:

Visual Studio\Common7\IDE\Private Assemblies\

2) location of dtexec, dtsdebughost, etc:

Microsoft SQL Server\Dts\Binn\

The application will be able to load the assembly from its home directory.

Michael