Unable to emit assembly Referenced assembly does not have a strong name

· September 18, 2007

Hmmm - another “Why does VB.NET hides so many useful things from me?” thing that adds to my determination to vote for C# whenever i get the chance.

The case is as follows; you have a project that you want to strong name. However it references a assembly that not is strong named. That will give you the following error from the compiler:

Unable to emit assembly: Referenced assembly [...] does not have a strong name

So the solution (for us C#-junkies) is to go into the project properties and put your .snk file into the box for “Wrapper Assembly Key File” (under “Common Properties” and “General”).

However if you use VB.NET then you’re stuck! There is no box like that because the VB.NET-team of Microsoft thinks that is to hard for us to handle, or something.

Here is one solution which is quite hard to pull of if you have many projects in your solution. Haven’t found any better so far…

Twitter, Facebook