开发者

app can not run on Windows 2003

开发者 https://www.devze.com 2022-12-30 14:53 出处:网络
I have created a application base on .net framework 2.0 in a windows XP machine, then I copied the app to another Windows 2003 server machine which has installed .net framework 3.5

I have created a application base on .net framework 2.0 in a windows XP machine, then I copied the app to another Windows 2003 server machine which has installed .net framework 3.5 but the app can't be launched and throught the event view i got the following errors:

Event Type: Error
Event Source:   .NET Runtime 2.0 Error Reporting
Event Category: None
Event ID:   5000
Date:       5/15/2010
Time:       2:19:39 PM
User:       N/A
Computer:   AVCNDAECLIU4
Description:
EventType clr20r3, P1 ftacsearchpopup.exe, P2 1.0.0.0,  P3 4bee3c42, P4 ftacsearchpopup, P5 1.0.0.0, P6 4bee3c42,  P7 11, P8 e, P9 system.io.fileloadexception,  P10 NIL.

For more information开发者_StackOverflow, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:

I have used FusLogVw to got the possible reason: in my app's project, i have add a xxx.dll as reference and in the Windows 2003 machine, the version of xxx.dll is different with the one I referenced in my project, so what can i do to solve the problem to let the app run with a different version xxx.dll?


Short from just rebuilding your app so you'll be 100% sure the changed assembly is compatible with your program, you can use the <bindingRedirect> element in the app.exe.config file.

Write an event handler for AppDomain.CurrentDomain.UnhandledException and log the e.ExceptionObject.ToString() value to get better error reporting.


It is probably a dependency on a missing dll.

You state that you have xxx.dll on the machine, but it's the wrong version. You should be able to do an "xcopy deployment" (which is simply to copy the dlls that you need next to the .exe when you install it). If the xxx.dll it needs is next to the .exe then it won't look elsewhere on the PC for it, and so will use the correct version.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号