Thursday 6 August 2009

System.IO.FileloadException error

At work we had an issue when trying to deploy a .Net 3.5 application to servers.

It would work correctly on all our development machines but when we deployed it to the server the process would show up in Task Manager but then disappear.

We found an entry in the Event Viewer as shown below


Event Type: Error
Event Source: .NET Runtime 2.0 Error Reporting
Event Category: None
Event ID: 5000
Date: 06/08/2009
Time: 11:29:34
User: N/A
Computer: XXX
EventType clr20r3, P1 xxx.exe, P2, P3 4a7aaf1b, P4 xxx, P5, P6 4a7aaf1b, P7 9a, P8 f, P9, P10 NIL.


We found that a means that the application cannot find a dll / assembly of some sort, but we didn't know the name of the dll or assembly. After a bit of digging ( we found that we could catch exceptions when the main form is loaded in (Program.cs) as below:

Application.Run(new MainForm());
catch (Exception ex)



When we ran the application on the server we got an error
The error showed that the ReportingServices dlls were the wrong version. We had copied 2005 (version dlls into the application folder, but our application required 2008 (version dlls.

Hope this helps some one


Anonymous said...

Singh is King... It helped us too :)

Sony said...

Glad to hear it helped

Unknown said...

Hi, thanks for sharing. I helped it. Your hopes have come true. My friend advised to download the dll files, but I could not find the desired file. So to say not identify the file. Maybe someone come in handy. Good luck.