Thursday, April 21, 2011

Strong name validation failed on VB.NET Assembly

I have a VB.Net 1.1 application works just fine after compiling in Visual Studio. However, I want to use ILMerge to combine all the referenced assemblies into a single executable just to make it easier to move around. After I send it through ILMerge and try to run it I get the error

"Strong name validation failed for assembly.exe" .....

But none of my stuff is strong named! I saw this post here: http://stackoverflow.com/questions/403731/strong-name-validation-failed and tried running it through 'sn.exe -Vr merged.exe' but that gives me this error:

"merged.exe does not represent a strongly named assembly"

Has anyone else had this problem before? How do I fix it?

UPDATE:

I'm starting to feel like Strong name validation isn't the real problem here. I'm building against .NET v1.1 and running on a machine where that is the only .NET version installed (happens to be Windows 2003). The merged executable appears to die with that error on every Windows 2003 machine I try, but if I try to run it on a more modern OS (Vista) it at least starts, but that's not really a good test since the environment isn't fit for a real test.

  • I have verified that my app.config has the correct settings (specifying required and supported runtime version of v1.1.4322)
  • I use the /targetplatform:v1.1 option when running my assemblies through ILMerge.

ILMerge is definitely causing the problem (i.e. it works fine before I merge), I just don't know how to fix it.

From stackoverflow
  • I had to find and download a very old version of ILMerge (v1.1) in order for my merged binary to work; there must be a bug in the way the current ILMerge application builds .NET 1.1 assemblies. Thankfully we had one internally because I would probably have never found it online.

0 comments:

Post a Comment