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 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 (23)

  1. Tim says:

    The Dev11 VC compiler does not support Windows XP? Is that really possible?

  2. AngryDev says:

    OK, that needs to be fixed. There are Millions of XP machines out there still.

  3. The above issue was resolved in the recent release of CTP 4. Please install the latest patch Visual Studio 2012 Update 1 CTP 4…/vsupdate_KB2707250.exe This would allow ClickOnce bootstrapper to run on Windows XP systems.

  4. SVB says:

    Does this affect setup files created using VB.Net through VS2012?

  5. Yes it affects to any bootstrapper created using VS 2012.

  6. 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?

  7. Frank Covey says:

    this game is cool!!

  8. Matt says:

    I am up to final release of Update 3 and this is still doing this?  Has a fix been released to address this?


  9. It was already fixed. You may have a different issue. Please let us know more about your application and the Operating System.

  10. Ian says:

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

  11. You can just apply the update and it should resolve the issue.

  12. Ian says:

    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?

  13. Hudq says:

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

  14. On Which OS do you find this issue?

  15. WMY says:

    thanks for this issue!

  16. Adrián says:

    Programs made with VS not working on windows XP OS? Thx Microsoft nice job!! (y)

  17. is not a valid Win32 application says:

    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;


    // Get a token for this process.

    if (!OpenProcessToken(GetCurrentProcess(),


    return false;

    // Get the LUID for the shutdown privilege.

    LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME,


    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,


    if (GetLastError() != ERROR_SUCCESS)

    return false;

    // Shut down the system and force all applications to close.

    if (!ExitWindowsEx(functionCode | EWX_FORCE,




    return true;

    return false;


    And then…  

    using System;

    using System.Collections.Generic;

    using System.Linq;

    using System.Text;

    using System.Threading.Tasks;

  18. Steve says:

    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.

  19. arvind says:

    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.

  20. Nissi says:

    Hey can someone fix my laptop.   I can give him my team viewer ID please.

  21. Sasi says:

    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.

Skip to main content