title: Visual Studio 2010 - Cannot Register Assembly
body: <p>I am running Visual Studio 2010 on a Windows 7 VM and trying to build a fairly large solution.  When I try to do so, I get the error:</p>
  
  <pre><code>Cannot register assembly "C:\Development\ProjectName\Source\bin\Debug\AssemblyName.dll" - access denied.  Please make sure you're running the application as administrator.  Access is denied.  (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
  </code></pre>
  
  <p>I have taken the following steps:</p>
  
  <ol>
  <li>Confirmed that I am in fact running Visual Studio 2010 as administrator.</li>
  <li>Restarted the VM.</li>
  <li>Confirmed that the assembly does exist exactly where Visual Studio is looking for it.</li>
  <li>Confirmed that administrator has full control over the relevant file.</li>
  <li>Cleaned and rebuilt the project (multiple times).</li>
  </ol>
  
  <p>I have also found that building the project which creates AssemblyName.dll, manually registering it with RegAsm, and then building the project which requires AssemblyName.dll does not result in an error, but this is not a desirable workaround as it requires manual control.  Can anyone give me some advice on how to solve this problem?</p>
  
  <p>Many thanks.</p>