title: Assembly generation failed - Referenced assembly does not have a strong name. Why doesn't other solutions work?
body: <p>This is a classic problem, which has <a href="http://ianpicknell.blogspot.com/2009/12/adding-strong-name-to-third-party.html" rel="noreferrer">numerous</a> solutions <a href="http://buffered.io/posts/net-fu-signing-an-unsigned-assembly-without-delay-signing/" rel="noreferrer">described</a>. However, none of them seem to work for me.</p>
  
  <p>I am using the Report.NET library in a SharePoint solution. Adding the Reports.dll as a reference and compiling results in the error message "Assembly generation failed - Referenced assembly 'Reports' does not have a strong name." My project, however, has a key.snk linked in the project properties. So I try to disassemble, sign and reassemble the dll with this key file, as described elsewhere:</p>
  
  <pre><code>C:\Users\Administrator\Documents\Visual Studio 2010\Projects\MyProj
  \dll&gt;ildasm Reports.dll /out:Reports.il
  
  C:\Users\Administrator\Documents\Visual Studio 2010\Projects\MyProj
  \dll&gt;ilasm Reports.il /dll /resource=Reports.res /key=..\key.snk
  
  &lt;output removed for brevity&gt;
  
  Class 95
  Class 96
  Method Implementations (total): 1
  Resolving local member refs: 0 -&gt; 0 defs, 0 refs, 0 unresolved
  Writing PE file
  Signing file with strong name
  Operation completed successfully
  </code></pre>
  
  <p>I end up with a new Reports.dll timestamped to now. Adding this as a reference to my project and building, though, gives the same error message as before. The properties of the "Reports" reference displays "Strong Name: False".</p>
  
  <p>Not to be discouraged by a bit of trouble, I attempt to re-sign the assembly using the strong naming utility:</p>
  
  <pre><code>C:\Users\Administrator\Documents\Visual Studio 2010\Projects\MyProj
  \dll&gt;sn -R Reports.dll ..\key.snk
  
  Microsoft (R) .NET Framework Strong Name Utility  Version 4.0.30319.1
  Copyright (c) Microsoft Corporation.  All rights reserved.
  
  Assembly 'Reports.dll' successfully re-signed
  </code></pre>
  
  <p>It might be worth noting that running the SN utility fails with the error message "Reports.dll does not represent a strongly named assembly" when running it <em>before</em> the disassemble/sign/reassemble process.</p>
  
  <p>However, when running it after disassembly/signing/reassembly, I still get the original error message when re-adding it to Visual Studio.</p>