0
votes

I have a current problem now about this error

Assembly generation failed -- Referenced assembly 'CitiReusableCode' does not have a strong name

I found these question same to mine

Referenced assembly 'XXX' does not have a strong name though it does

Assembly generation failed -- Referenced assembly 'Interop.Office' does not have a strong name

How to fix "Referenced assembly does not have a strong name" error?

I follow those steps in the solutions but it didn't give me a solution to my problem.

Is there anyone can help me how to fix it..

3

3 Answers

0
votes

That error shows if your reference is not in the GAC..

Try to find you dll in the GAC usually it is found in C:\Windows\assembly but im not sure in you PC where it is.. just search where is you GAC

If your dll not in there, try to put your reference in the GAC

Just Follow this on how to put your dll reference in GAC

Drag and drop a DLL to the GAC ("assembly") in windows server 2008 .net 4.0

try to drag and drop if it accepted but just follow the instruction in the link above

0
votes

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!

0
votes

This is possible in two cases:

  1. you have Code Analysis option enabled on you project and Treat Warnig as error option.
  2. your project has a referece to a signed assembly

To solve it please go to Project Propertie/Signing and check Sign The Assembly check box. from the drop down select "New..." option, generate the signature file and add the file to the project.