Note that there are some explanatory texts on larger screens.

plurals
  1. PODoes anyone know why a "manifest definition does not match the assembly reference" error might occur on a standard framework reference?
    text
    copied!<p>I have a problem that has puzzled me for some time now. On a WPF/.NET 3.5 product I have released, about 1 out of 100 installs will not be able to run the software at all due to the following error:</p> <blockquote> <p>System.Windows.Markup.XamlParseException: Failed object initialization (ISupportInitialize.EndInit). The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) Error at object 'System.Windows.Controls.MenuItem' in markup file 'mainwindow.xaml'.</p> </blockquote> <p>This is puzzling for three reasons:</p> <ol> <li><p>This only happens on about 1 to 2 percent of installs.</p></li> <li><p>There is nothing unusual as far as I can tell about the .NET installations or OS on these systems.</p></li> <li><p>This is happening with a default framework reference (System.Windows.Controls.MenuItem)</p></li> </ol> <p>Can anyone think of possible causes for this?</p> <p><strong>EDIT:</strong> After following the tip from "500", I was able to run the Fusion log viewer on the customer machine. On the development machine and all other test machines, there are successful binding attempts on "PresentationFramework" and "PresentationFramework.Aero", which are expected. On the client machine, there is an additional binding attempt that fails (Irrelevant lines removed):</p> <pre><code>*** Assembly Binder Log Entry (2/3/2013 @ 1:18:44 PM) *** The operation failed. Bind result: hr = 0x80070002. The system cannot find the file specified. Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll --- A detailed error log follows. === Pre-bind state information === LOG: DisplayName = PresentationFramework.Dawn TOP, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (Fully-specified) LOG: Initial PrivatePath = NULL LOG: Dynamic Base = NULL LOG: Cache Base = NULL LOG: AppName = NULL Calling assembly : PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35. === LOG: This bind starts in default load context. LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config. LOG: Post-policy reference: PresentationFramework.Dawn TOP, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 LOG: GAC Lookup was unsuccessful. LOG: Attempting download of new URL file:///C:/Program Files (x86)/My App/PresentationFramework.Dawn TOP.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/My App/PresentationFramework.Dawn TOP/PresentationFramework.Dawn TOP.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/My App/PresentationFramework.Dawn TOP.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/My App/PresentationFramework.Dawn TOP/PresentationFramework.Dawn TOP.EXE. LOG: All probing URLs attempted and failed. </code></pre> <p>A Google search for "PresentationFramework.Dawn" returns no results and I cannot locate any reference to this file. Any explanation or additional tests that can be done?</p> <p><strong>EDIT 2:</strong> It turns out that the customer had installed an unofficial Windows 7 Aero theme called "Dusk". For some reason, PresentationFramework decided to make a call to PresentationFramework.Dusk instead of PresentationFramework.Aero (a reference that I explicitly included in the project). I'm assuming that the error is the result of a bad installation of the 3rd party theme since Dusk cannot be found in the GAC, but can you shed any light on how I might stop the reference from being attempted and force all GUI elements to use PresentationFramework.Aero?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload