Loading renamed C# assembly throws FileNotFoundException
<p>I have an C# assembly that is referenced by a C# application. </p>

<p>Because of our coding standards, there is a rule where debug DLLs are postfixed by a "d" (e.g. <code>ProjectA.dll</code> becomes <code>ProjectAd.dll</code>). When I add a reference to the renamed DLL to the application, it builds successfully, but throws a <code>FileNotFoundException</code> upon execution.</p>

<p>The error thrown is as follows:</p>

<p><code>System.IO.FileLoadException: Could not load file or assembly 'ProjectA, Version=1.0.0.0, Culture=neutral, PublicKeyToken=49df7f988e86ed92' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'ProjectA, Version=1.0.0.0, Culture=neutral, PublicKeyToken=49df7f988e86ed92'</code></p>

<p>The assembly manager also chimes in with a warning and error:</p>

<p><code>WRN: Comparing the assembly name resulted in the mismatch: PUBLIC KEY TOKEN<br>
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.</code></p>

<p>From the error message, it looks like it is looking for an assembly without the <code>d</code> postfix. </p>

<p>BTW, there is a C++/CLI assembly that is referenced by the same application. It has a <code>d</code> appended to the DLL, but viewing the properties of the reference in VS2005 shows that the security identity has the <code>d</code> correctly appended. The C# reference does <em>not</em> have the <code>d</code> appended in the properties window.</p>

<p>What do I have to do to get this working properly for the debug C# assemblies? I've tried modifying the entries in AssemblyInfo.cs to no avail. Is this something that a manifest file would resolve?</p>
