Partager via


Setup.exe is not a valid Win32 application

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 https://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.

 

Comments

  • Anonymous
    October 26, 2012
    The Dev11 VC compiler does not support Windows XP? Is that really possible?

  • Anonymous
    October 26, 2012
    Yes it is possible.

  • Anonymous
    November 07, 2012
    OK, that needs to be fixed. There are Millions of XP machines out there still.

  • Anonymous
    November 07, 2012
    The above issue was resolved in the recent release of CTP 4. Please install the latest patch Visual Studio 2012 Update 1 CTP 4 download.microsoft.com/.../vsupdate_KB2707250.exe This would allow ClickOnce bootstrapper to run on Windows XP systems.

  • Anonymous
    November 14, 2012
    Does this affect setup files created using VB.Net through VS2012?

  • Anonymous
    November 14, 2012
    Yes it affects to any bootstrapper created using VS 2012.

  • Anonymous
    February 02, 2013
    I've updated VS2012 Ultimate with 2012 Updae 1 CTP 4, but am still receiving the same error shown above when trying to open Form on Windows Virtual PC XP Mode. Win7 dev computer is 64 bit.  Is Virtual PC the problem?

  • Anonymous
    March 29, 2013
    this game is cool!!

  • Anonymous
    July 29, 2013
    I am up to final release of Update 3 and this is still doing this?  Has a fix been released to address this? Thanks,

  • Anonymous
    July 29, 2013
    It was already fixed. You may have a different issue. Please let us know more about your application and the Operating System.

  • Anonymous
    August 23, 2013
    I'm still having this issue, do you need to change anything in the settings or just apply the update?

  • Anonymous
    August 23, 2013
    You can just apply the update and it should resolve the issue.

  • Anonymous
    August 23, 2013
    I'm now running with Microsoft Visual Studio . Update 3. - Version 11.0.0660610.01 - Is this as up to date as it can be? and include the fix?

  • Anonymous
    September 15, 2013
    I'm now running with the newest Microsoft Visual Studio . Update 3.But the issue still occur,Why?

  • Anonymous
    September 15, 2013
    On Which OS do you find this issue?

  • Anonymous
    December 19, 2013
    thanks for this issue!

  • Anonymous
    September 26, 2014
    thanks

  • Anonymous
    March 30, 2015
    Programs made with VS not working on windows XP OS? Thx Microsoft nice job!! (y)

  • Anonymous
    April 28, 2015
    I build an application with VS2013.4 that runs everywhere except on Windows XP.  Because so many necessary functions available in Win32 are not implemented in .NET Framework 4, we are forced to use INTEROP.  That may be irrelevant to this issue because the  XP   program loader says the application isn't a valid Win32 application.  I'm going to try to put the code in here.  Last time I tried this the website said there were too many characters (> 60000).  That's a lie.  Here goes. // GHPMIN.cpp : Defines the exported functions for the DLL application. // #include "stdafx.h" // This DLL is very small, very simple, all it does is call ExitWindowsEx with an argument that is an integer with bits set according to the desired action // To call ShutdownDLLFunction(int functionCode) from C#, add the following decorated external method declaration: // [System.Runtime.InteropServices.DllImport(@".GHPMIN.DLL")] // public static extern bool ShutdownDLLFunction32([System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.I4)] int functionCode); extern "C" _declspec(dllexport) BOOL _stdcall  ShutdownDLLFunction(int functionCode)  // returns true unless there is an error { HANDLE hToken; TOKEN_PRIVILEGES tkp; // Get a token for this process. if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken)) return false; // Get the LUID for the shutdown privilege. LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME, &tkp.Privileges[0].Luid); tkp.PrivilegeCount = 1;  // one privilege to set     tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; // Get the shutdown privilege for this process. AdjustTokenPrivileges(hToken, FALSE, &tkp, 0, (PTOKEN_PRIVILEGES)NULL, 0); if (GetLastError() != ERROR_SUCCESS) return false; // Shut down the system and force all applications to close. if (!ExitWindowsEx(functionCode | EWX_FORCE, SHTDN_REASON_MAJOR_OPERATINGSYSTEM | SHTDN_REASON_MINOR_UPGRADE | SHTDN_REASON_FLAG_PLANNED)) return true; return false; }   And then...   using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;

  • Anonymous
    June 09, 2015
    I'm using VS2012 update4 and i still meet the same issue. And i can't find  general in Configuration Properties, there is only Configuration under it.

  • Anonymous
    June 11, 2015
    I'm using Need for speed most wanted and i still meet the same issue. And i can't find general in Configuration Properties, there is only Configuration under it.

  • Anonymous
    September 04, 2015
    Hey can someone fix my laptop.   I can give him my team viewer ID please.

  • Anonymous
    January 23, 2016
    vcredist_x86.exe i'm trying to install in windows 2000 server, but its says not a valid 32.exe application. Please help us to resolve.