locked
Assembly generation failed: Referenced assembly "xyz" does not have a strong name RRS feed

  • Question

  • I trying to compile my project but I get assembly generation failed error : Referenced assembly "xyz" does not have a strong name..I created a new strong name key file..How do I solve this in Visual Studio 2008 IDE..?
    Tuesday, April 7, 2009 5:30 PM

Answers

  • Just so I understand correctly...  You have some open source .nettiers DAL asseblies that you are referencing.  You have the source code for those assemblies and you compiled them with a strong name key file?   Do I have that correct?

    If you check out this article it really explains strong naming...

    http://msdn.microsoft.com/en-us/magazine/cc163583.aspx

    It looks like you have two options.  Strong name the asseblies you are using (since it seems to be open source you should be able to do this).  If you CANNOT strong name the asseblies than the referencing program must NOT be strong named either (refer to article).

    If you were able to strong name the assemblies without error MAKE SURE you rebuild your main referencing application.
    Ryan
    • Marked as answer by shyakaster Wednesday, April 8, 2009 4:58 PM
    Wednesday, April 8, 2009 2:44 PM

All replies

  • If the referenced assembly is yours then you need to ...

    1.  Open the project for the referenced assembly.
    2.  Click on 'Project' from the main menu and select 'xyz' Properties.
    3.  Navigate to the 'Signing' tab on the left hand side.
    4.  Select the 'Sign the assembly' check box
    5.  Now you can use your key file in the 'Choose a strong name key file' Text box.

    Rebuild that assembly and you should be good to go.

    You can now open up the project that makes the reference and rebuild that project.  NOTE:  You may need to remove and re-add the reference.

    Hope this helps!


    Ryan
    Wednesday, April 8, 2009 1:14 PM
  • I did all that you mentioned but my project(Project name:ProsceniumPresence) has a .nettiers DAL and the problem is with Proscenium.Presence.Data and Proscenium.Presence.Entities files..The error says Referenced assembly Proscenium.Presence.Data does not have a strongname, same with Proscenium.Presence.Entities.  
    Wednesday, April 8, 2009 1:32 PM
  • Just so I understand correctly...  You have some open source .nettiers DAL asseblies that you are referencing.  You have the source code for those assemblies and you compiled them with a strong name key file?   Do I have that correct?

    If you check out this article it really explains strong naming...

    http://msdn.microsoft.com/en-us/magazine/cc163583.aspx

    It looks like you have two options.  Strong name the asseblies you are using (since it seems to be open source you should be able to do this).  If you CANNOT strong name the asseblies than the referencing program must NOT be strong named either (refer to article).

    If you were able to strong name the assemblies without error MAKE SURE you rebuild your main referencing application.
    Ryan
    • Marked as answer by shyakaster Wednesday, April 8, 2009 4:58 PM
    Wednesday, April 8, 2009 2:44 PM
  • Thanks for the help, I strong named all the assemblies in the solution and rebuilt the entire solution and that worked..!..I decided to strong name the main referencing application as well and that to worked fine..

    Thanks alot
    • Proposed as answer by wes a Thursday, February 20, 2014 6:52 PM
    Wednesday, April 8, 2009 4:58 PM
  • Just had the same problem/error message using Visual Studio 2010 projects.

    Since I do not like just adding strong-names to all of my assemblies without knowing the reason for that error message I did some investigation and saw that the problem was caused by Microsoft.CSharp.dll assembly. Since I do not need functionality from that assembly I removed it which also resolved the "strong-name issue".

    Of course it is another question/issue why the project template for "class library" adds tons of references to assemblies which usually aren't needed ;-) Using the "Client Profile" for my client apps and only the full profile when really needed in order to avoid dependencies which aren't necessary.


    Programming is a kind of art but not all programmers are artists.

    • Proposed as answer by hfrmobile Friday, October 26, 2012 11:23 AM
    Friday, October 26, 2012 11:23 AM