Unable to emit assembly

Raymond8893 picture Raymond8893 · Feb 23, 2012 · Viewed 8.7k times · Source

I have created a visual basic class library named dataLibrary and have added it as a reference in a visual studio tools for application program in infopath 2007, and imported it.

Now when I try using a class defined in the library, I get the following error: "Unable to emit assembly: Referenced assembly 'dataLibrary' does not have a strong name"

Can somebody help me out here, I've never seen anything like this before.

Answer

unhappyCrackers1 picture unhappyCrackers1 · Mar 14, 2012

The issue you are likely encountering is that your class library has not been signed with a strong name, however your assembly IS signed.

Resolution: Either don't sign your assembly and leave the class library unsigned or sign both the assembly and class library.

For more info, take a look at this solid answer on the topic:

Why would I see "Unable to emit assembly: Referenced assembly ... does not have a strong name" when trying to add a reference?