cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
molesan
Level 2

Using CoCreateObjectDotNet with strong named assemblies

I am facing quite an odd problem (or at least something that I find odd).

I can use CoCreateObjectDotNet to create objects of classes that live in .NET assemblies without any problems.
CoCreateObjectDotNet("MyDLL.dll", "SomeNamespace.MyClass");

However, if I sign MyDLL.dll it stops working i.e. the CoCreateObjectDotNet call fails.

Does anyone have experience in this area?

Thanks for your time.
Labels (1)
0 Kudos
(3) Replies
Christopher_Pai
Level 16

Do you have a sample project ( with sample sn key ) that reproduces the problem that you can share? It would make it easier for me to mock this up and see if I can figure anything out.
0 Kudos
Christopher_Pai
Level 16

Just for fun, I created a class library for clr 2.0 using VS2008 and signed it with a .pfx file. InstallShield 2009 Beta 2 was able to consume it with DotNetCoCreateObject() even if the assembly was also deployed to the GAC.

Sorry but I don't have 2008 installed anywhere right now to see if it behaves any differently.
0 Kudos
molesan
Level 2

Thanks for taking the time to look into this!

I started "from scratch" and created a new "signed" .NET Assembly and DotNetCoCreateObject works fine.

It seems as if it's a problem with the snk file that is associated to the DLL I am trying to use. (As if I create a brand new snk file for the DLL it actually works - but I HAVE to use the particular snk file that doesn't seem to work at the moment!)

So, it looks as if it's an issue with the DLL/.snk file rather than InstallScript in itself..

[If that makes any sense at all...]

Thanks again for you help
0 Kudos