.NET 4程序编写/编译在Windows 7计算机将无法在XP上运行 [英] .NET 4 Program written/compiled on Windows 7 machine won't run on XP

查看:162
本文介绍了.NET 4程序编写/编译在Windows 7计算机将无法在XP上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序,我写在我的Windows 7旗舰版机采用C#.NET 4.0在Visual Studio 2010中。这个应用程序正常工作的Vista和其他Windows 7计算机,但每当有人运行Windows XP尝试运行它崩溃。

I have an app that I wrote using C# .NET 4.0 in Visual Studio 2010 on my Windows 7 Ultimate machine. This app works fine on both Vista and other Windows 7 computers, but whenever someone running Windows XP tries to run it it crashes.

为了再现这个我试过在我的Win XP的VMWare的机器上运行它,它崩溃,我在那里。遗憾的是它并没有给我任何特定的错误,只是通知我,该方案已经崩溃,需要关闭。

In order to reproduce this I've tried running it on my Win XP VMWare machine and it crashes for me in there. Unfortunately it doesn't give me any specific error, just informing me that the program has crashed and needs to close.

另外一个用户给我发了以下内容:

One other user sent me the following:

Run-time error '339'
Component 'vbalSGrid6.ocx' or one of its dependencies not correctly registered: a file is  missing or invalid.

Code 0xe0434352
Flags 0x00000001

我不明白那个特定的位,当我尝试在我的虚拟XP的机器上运行它,我也做了一定要在那里安装.NET 4.0。

I don't get that particular bit when I try to run it on my Virtual XP machine, and I also made sure to install .NET 4.0 on there.

什么引起这个,为什么不能在XP下的应用程序运行,如果.NET 4框架是支持XP?

What could be causing this, and why won't the app run in XP if the .NET 4 framework is supported for XP?

在程序中使用的组件:DataGridView中,组合框,按钮,标签,LinkLabel的,NewtonSoft的JSON解析器,并且仅此而已。

Components used in the program: DataGridView, ComboBox, Buttons, Labels, LinkLabel, NewtonSoft's JSON parser, and that's about it.

我百思不得其解,并有完全不知道从哪里开始。想法?

I am baffled and have utterly no idea where to start. Ideas?

更新:嗯,尝试运行我的其他XP上最近创建的应用程序,它加载的罚款。唯一的主要区别两者之间(在组件我用反正)我使用NewtonSoft的JSON库,其实我觉得是一个.NET 3.5组件。

UPDATE: Hmm, tried running my other recently created application on XP and it loaded fine. The only major difference (in the components I used anyway) between the two is my use of NewtonSoft's JSON library, which I actually think is a .NET 3.5 component.

更新2 :只是踢我试图在我的Wind7机中的Windows XP SP3兼容模式下运行的程序,它运行得很好。当然,我不知道有多么紧密的兼容模式模拟真实的XP SP3的环境,但我想我给你们大家的信息呢。

UPDATE 2: Just for kicks I tried running the program on my Wind7 machine in "Windows XP SP3" compatibility mode and it ran fine. Of course, I have no idea just how closely the "compatibility mode" emulates a true XP SP3 environment, but I figured I'd give ya'll the info anyway.

推荐答案

我一直注意到,它在错误中引用的模块,它给了我是 System.Drawing中,我觉得很奇怪。我想也许我所用是造成这一问题的图片框,所以我试图禁止一切跟那个,但没有成功。

¡¡ IT WAS THE APPLICATION ICON !!

I kept noticing that the module it referenced in the error it gave me was system.drawing which I thought was odd. I figured perhaps the PictureBox I was using was causing the issue, so I tried disabling everything to do with that, to no avail.

我有我的商业伙伴成立了XP中,这样我们就会有另一台机器从我的VMware XP中预留与测试,以防万一有一个与它的一些奇怪的问题。

I had my business partner set up his XP box so that we'd have another machine to test with aside from my VMWare XP box just in case there was some odd issue with it.

之后,他把它设置和复制他的应用程序说的图标看起来像DOS的人,我有灵光一现。

After he got it set up and the app copied over he said "The icons look like DOS ones" and I had a eureka moment.

我使用的PNG的作为图标,因为它们支持投影胶片和诸如此类的东西,但XP好好尝试一下本机支持他们。因此,当应用程序被复制到桌面,它只是使用一个通用的图标为它,并且应用程序运行时坠毁,因为XP不知道如何呈现。PNG。

I was using .PNG's as the icons because they support transparencies and whatnot, but XP doens't natively support them. So when the app was copied to the desktop it just used a generic icon for it, and when the application was run it crashed because XP doesn't know how to render a .PNG.

这篇关于.NET 4程序编写/编译在Windows 7计算机将无法在XP上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆