C# 应用程序在 Windows 7 中运行,但不能在 Windows XP 中运行

发布于 2024-09-11 18:33:23 字数 393 浏览 2 评论 0原文

我使用 Windows 7 作为操作系统在 VS C# Express 2008 中创建了一个应用程序。它在其他 W7 机器上运行得很好,但是当我们尝试将它部署在 XP 机器上时,它甚至无法运行。我只是收到常见的“应用程序需要终止”错误消息。该应用程序是使用 .NET 3.5 构建的,所有计算机都至少安装了 3.5。我可以做些什么来让程序在以前的版本中运行吗?预先感谢您的帮助。

更新信息。这些机器都使用 x86 32 位操作系统,XP SP3 或 W7,因此我认为不需要检查 64 位问题。应用程序本身会将图像加载到图像列表中,并在发现文件名中断时添加图像。 (例如,文件夹中有 4 个图像,1-3 和 5,应用程序所做的就是迭代每个图像名称,当它发现图像 4 丢失时,它会添加一个占位符图像并将其标记为图像 4。)

I have created an application in VS C# Express 2008 using Windows 7 as my OS. It runs perfectly fine on other W7 machines, but when we try and deploy it on a machine with XP it doesn't even run. I just get the usual "Application needs to be terminated" error message. The app was built using .NET 3.5 and all the machines have at least 3.5 installed. Is there anything that I may be able to do to get the program running in previous versions? Thanks in advance for your help.

Updated Info. The machines all use x86 32-bit OS, either XP SP3 or W7, so I don't think that there is a huge need for checks for 64-bit issues. The application itself is loading images into an image list and adding in an image when it finds a break in the file names. (eg. There are 4 images in a folder, 1-3 and 5, what the application does is iterates through each image name and the minute it sees that image 4 is missing, it adds a placeholder image and labels it image 4.)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

满天都是小星星 2024-09-18 18:33:23

您应该设置一个UnhandledExceptionEventHandler,以便您可以记录有关应用程序当前状态的信息和异常信息。它不会阻止您的应用程序崩溃,但它会为您提供有关所发生情况的更多信息,并使您的最终用户更容易在应用程序崩溃时为您提供需要了解的信息。

这篇文章很好地描述了如何做到这一点。

You should set up an UnhandledExceptionEventHandler so that you can log information about the current state of your application and the exception information. It isn't going to stop your application from crashing, but it will give you more information about what happened and make it easier on your end user to give you what you need to know when the application crashes.

This article give a good description of how to do that.

南巷近海 2024-09-18 18:33:23

首先,您必须确保 Windows XP 计算机上安装了 .Net Framework 3.5。如果一切正常,那么您应该检查您是否使用“第 3 方 dll 作为参考”并验证它们在 Windows XP 计算机上的存在和版本是否正确。

也许这会有所帮助。

First you must be sure that .Net Framework 3.5 is installed on your Windows XP machine. If everything is OK, then you should check if you are using "3rd party dlls as reference" and validate their existence and correct versions on your Windows XP machine.

Probably this can help.

也只是曾经 2024-09-18 18:33:23

记录应用程序引发的异常,以便您可以修复它。

Log the exception which is thrown by the application so that you can fix it.

掀纱窥君容 2024-09-18 18:33:23

信息不多,但有一些需要检查的事项:

确保您有 XP 和 SP 版本的最新补丁

也许您需要以管理员身份运行该程序 - 您是否以管理员身份登录

您是否检查过 Windows 应用程序错误日志以查看是否那里有什么可能有帮助的

Not a lot of info but some things to check:

Make sure you have the latest patches on XP and SP release

Maybe you need to run the program as administrator - are you logging in as admin

Have you checked the windows appliation error log to see if there is anything there that might be helpful

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文