Error Message: Could not load file or assembly 'Delete ReportingContents'
<p>I've just got an error message that was somewhat unexpected:</p>

<blockquote>
  <p>Error Message: Could not load file or
  assembly 'Delete ReportingContents' or
  one of its dependencies. The located
  assembly's manifest definition does
  not match the assembly reference.
  (Exception from HRESULT: 0x80131040)</p>
</blockquote>

<p>I've got an ASP.NET website that has abotu 10 projects makign it up which are compiled into DLLS and in the bin directory. ReportingContents is one of these projects. In the past I have had success in copying over a new version of the files (dll, pdb and xml) to the bin directory and recycled the app pool and it just picks up the new version on its own. This time I thought "I shouldn't have a debug version on the site" so I built as release and just copied up the dll and xml files and asked our deployment people to remove the pdb.</p>

<p>When I was told it was all done I tried to access the site and got the above error message.</p>

<p>The thing that surprises me is that the assembly it mentions is "Delete ReportingContents" and I don't know where the "Delete " might have come from in there.</p>

<p>I'm not sure what could have gone wrong. so I'm hoping that you can help:</p>

<p>My options are:</p>

<p>1) I should have used a debug version since that is what was there already.
2) My deployment guy failed to delete the pdb that was no longer relevant.
3) The code wasn't properly refreshed by the app pool recycle and it was expecting the old dll and getting the new one
4) Something went wrong elsewhere that really shouldn't have done.</p>

<p>Any thoughts or suggestions greatly appreciated... I need to deploy this code and don't really dare to do so again until I know what went wrong the first time...</p>

<p>Its worth mentioning that I only have access to the live environment through somebody else so I can't easily check anything on there myself.</p>

<p>And in case its useful here is the accompanying stack trace:</p>

<pre><code>Error Target: System.Reflection.Assembly _nLoad(System.Reflection.AssemblyName, System.String, System.Security.Policy.Evidence, System.Reflection.Assembly, System.Threading.StackCrawlMark ByRef, Boolean, Boolean)

Stack Trace:
  at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark&amp; stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
  at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark&amp; stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
  at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark&amp; stackMark, Boolean forIntrospection)
  at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark&amp; stackMark, Boolean forIntrospection)
  at System.Reflection.Assembly.Load(String assemblyString)
  at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective)
</code></pre>
