VS2012编译出来的程序,在XP上运行,出现“.exe 不是有效的 win32 应用程序” “not a valid win32 application”

阅读此文章的同学先看看我的另外一篇文章:

VS2008/VS2012/MFC/C++/ACCESS/Redistributable Package/installshield/打包/安装/部署


==============================================================================


升级vs2010到vs2012,突然发现build出来的应用程序无法运行,提示“不是有效的 win32 应用程序” or “not a valid win32 application”。

参考CSDN论坛中的方法,找到下面这篇文章:

http://blogs.msdn.com/b/vsnetsetup/archive/2012/10/16/setup-exe-is-not-a-valid-win32-application.aspx

You would receive the below error message while running a ClickOnce bootstrapper created using Visual Studio 2012 on Windows XP systems.

 

 

Clickonce bootstrapper engine (setup.exe) that was shipped with Visual Studio 2012 is NOT compatible with any OS below Windows Vista.  So, the above error message is expected and by design. The reason for this behavior is because the bootstrapper is compiled using the VC compiler and the Dev11 VC compiler does not support Windows XP.  

 

So the workaround is to install all the prerequisites manually and launch the ClickOnce application directly from deployment manifest file (.application). Another workaround would be to create a sample ClickOnce application using Visual Studio 2010 OR Visual Studio 2008 with the same name as mentioned in Visual Studio 2012 and publish it. From the published location take the setup.exe bootstrapper and replace the existing setup.exe bootstrapper created using Visual Studio 2012

 

Microsoft VC development team has done work to make VC compilers work on Windows XP in Visual Studio 2012 Update 1 CTP 3 http://www.microsoft.com/en-us/download/details.aspx?id=34818 This Visual Studio 2012 Update 1 CTP 3 patch provides an opportunity to users in building VS2012 C++ project for Win XP OS. For the users who want to develop their applications using Dev11 VC compiler (v110) for Windows XP OS, would need to install Visual Studio 2012 Update 1 CTP 3 patch.

 


文章提示,dev11 VC complier 已经不在支持XP,如果想要支持XP系统,需要更新至 VS2012 Update1,同时,在

Properties -> Configuration Properties -> General -> PlatForm ToolSet 

选择 

Visual Studio 2012 - windows XP (v110_xp)

这样compiler生成的exe文件方可在XP系统上运行。

VS2012 update1 下载参考

http://www.microsoft.com/visualstudio/eng/downloads#d-visual-studio-2012-update

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值