【轉】VS2012編譯出來的程式,在XP上運行,出現“.exe 不是有效 win32 應用程式” “not a valid win32 application”

來源:互聯網
上載者:User

標籤:

原文網址:http://www.cnblogs.com/Dageking/archive/2013/05/15/3079394.html

VS2012編譯出來的程式,在XP上運行,出現“.exe 不是有效 win32 應用程式” “not a valid win32 application”

 

升級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

【轉】VS2012編譯出來的程式,在XP上運行,出現“.exe 不是有效 win32 應用程式” “not a valid win32 application”

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.