[英]Compiling a program for Windows XP x86
I wrote a windows forms application using VS2012 on windows 8 computer (x64) and I want it to run on Windows XP x86. 我在Windows 8计算机(x64)上使用VS2012编写了一个Windows窗体应用程序,并且希望它在Windows XP x86上运行。 When I try to run the program I get error "... is not a valid windows 32 application."
当我尝试运行该程序时,出现错误“ ...不是有效的Windows 32应用程序”。 How can i fix it?
我该如何解决?
Also make sure that you target the .Net Framework Version same as the version present in Testing machine. 还要确保将.Net Framework版本的目标定位为与Testing Machine中存在的版本相同。
If you are building C++ project then try this: 如果要构建C ++项目,请尝试以下操作:
General -> Platform Toolset -> Visual Studio 2012 -> Windows XP (v110_xp)
常规->平台工具集-> Visual Studio 2012-> Windows XP(v110_xp)
Its better that you choose the target as Any CPU . 最好将目标选择为Any CPU。
The compiler shall decide how to invoke the program ( x86 or x64 ) when you choose the Any CPU option , also choose the Any CPU platform. 选择Any CPU选项时,还应选择Any CPU平台,编译器应决定如何调用程序(x86或x64)。
Maybe far away guess with given that less information. 鉴于信息量较少,也许很遥不可及。
You should change Compile Target to x86 from 您应该将Compile Target从更改为x86
Project->Application Properties->Compile
Set Target CPU to x86
It sounds like you may be experiencing issues related to the Windows XP Targeting for C++ in Visual Studio 2012. Support for Windows XP with C++ targets was added in Visual Studio 2012 Update 1, but must still be explicitly selected in your project properties. 听起来您可能遇到了与Visual Studio 2012中的Windows XP Targeting for C ++有关的问题。VisualStudio 2012 Update 1中添加了对具有C ++目标的Windows XP的支持,但仍必须在项目属性中明确选择。
Windows XP Targeting with C++ in Visual Studio 2012 在Visual Studio 2012中使用C ++定位Windows XP
There is a great deal of additional information at the above link, but the specific setting you are looking for in the C++ project properties is General → Platform Toolset → Visual Studio 2012 - Windows XP (v110_xp) 上面的链接上有大量附加信息,但是您要在C ++项目属性中寻找的特定设置是“常规”→“平台工具集”→“ Visual Studio 2012-Windows XP(v110_xp)”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.