This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Using CoCreateObjectDotNet with strong named assemblies
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 06, 2008
02:53 AM
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.
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.
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 06, 2008
09:47 AM
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 06, 2008
10:07 AM
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.
Sorry but I don't have 2008 installed anywhere right now to see if it behaves any differently.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 08, 2008
09:25 AM
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
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