I have used PDFSharp/MigraDoc successfully in the previous version of an application I am working on. I have created a new version and everything seems fine on the development machine, but when I build the setup msi and deploy it to a test machine, it gives me a FileLoadException when it tries to load the MigraDoc.DocumentObjectModel assembly. I thought perhaps VS.Net had rebuilt the MigraDoc assembly but didn't have a necessary signing key, but I got the same error when I replaced all of my PDFSharp/MigraDoc files with fresh copies from the zip file. Can anyone help me? The entire exception is:
System.IO.FileLoadException: The located assembly's manifest definition with name 'MigraDoc.DocumentObjectModel' does not match the assembly reference.
File name: "MigraDoc.DocumentObjectModel"
at RECreations.UI.Controllers.MainWindowController.OpenAllSoldProductsReport()
at RECreations.UI.Windows.frmMain.reportsAllSoldProducts_Click(Object sender, EventArgs e)
at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
at System.Windows.Forms.MenuItemData.Execute()
at System.Windows.Forms.Command.Invoke()
at System.Windows.Forms.Control.WmCommand(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
=== Pre-bind state information ===
LOG: DisplayName = MigraDoc.DocumentObjectModel, Version=1.2.1930.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb
(Fully-specified)
LOG: Appbase = C:\Program Files\RECreations\RECreations Manager\
LOG: Initial PrivatePath = NULL
Calling assembly : RECreations.UI.Controllers, Version=0.2.1.0, Culture=neutral, PublicKeyToken=null.
===
LOG: Publisher policy file is not found.
LOG: Host configuration file not found.
LOG: Using machine configuration file from C:\WINNT\Microsoft.NET\Framework\v1.1.4322\config\machine.config.
LOG: Post-policy reference: MigraDoc.DocumentObjectModel, Version=1.2.1930.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb
LOG: Attempting download of new URL file:///C:/Program Files/RECreations/RECreations Manager/MigraDoc.DocumentObjectModel.DLL.
WRN: Comparing the assembly name resulted in the mismatch: PUBLIC KEY TOKEN
|