简体   繁体   English

应用程序无法在Windows 2003上运行

[英]app can not run on Windows 2003

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: 我已经在Windows XP计算机上基于.net framework 2.0创建了一个应用程序,然后将应用程序复制到了另一台已安装.net framework 3.5的Windows 2003服务器计算机上,但是该应用程序无法启动并且无法通过事件视图查看以下错误:

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, 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? 我使用FusLogVw来得到可能的原因:在我的应用程序项目中,我添加了一个xxx.dll作为引用,在Windows 2003计算机中,xxx.dll的版本与我在项目中引用的版本不同。我该如何解决该问题,以使该应用程序以其他版本xxx.dll运行?

It is probably a dependency on a missing dll. 它可能与缺少的dll有关。

You state that you have xxx.dll on the machine, but it's the wrong version. 您声明计算机上有xxx.dll,但是版本不正确。 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). 您应该能够进行“ xcopy部署”(这只是在安装时将所需的dll复制到.exe旁边)。 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. 如果所需的xxx.dll在.exe旁边,则它不会在PC上的其他位置显示,因此将使用正确的版本。

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. 只需重建应用程序,以确保100%确保更改后的程序集与您的程序兼容,您就可以使用app.exe.config文件中的<bindingRedirect>元素

Write an event handler for AppDomain.CurrentDomain.UnhandledException and log the e.ExceptionObject.ToString() value to get better error reporting. 为AppDomain.CurrentDomain.UnhandledException编写事件处理程序,并记录e.ExceptionObject.ToString()值以获得更好的错误报告。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM