PDFsharp & MigraDoc Foundation
http://forum.pdfsharp.com/

FileLoadException in deployed app
http://forum.pdfsharp.com/viewtopic.php?f=2&t=137
Page 1 of 1

Author:  deus777 [ Tue May 15, 2007 2:29 am ]
Post subject:  FileLoadException in deployed app

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

Author:  deus777 [ Wed May 16, 2007 2:30 am ]
Post subject:  Setup Project Causes Error?

I've done some more playing around with it, and if I run the program from the bin folder on my development machine, it works fine. Likewise, I can copy the files from my bin directly onto the test machine and it works. However, if I build the msi and install using that, I get the FileLoadException. It seems that somehow the setup project is packaging up the wrong files, or a corrupted version of them. I have tried refreshing the dependencies and rebuilding the msi, but I still have the problem. Has anyone else run into something like this?

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/