5

I tried to compile an application for Windows XP; the normal executable gives the error:

"... is not a valid Win32 application."

I read that I could create an XP-compatible executable by changing the Platform Toolset to Visual Studio 2015 - Windows XP (v140_xp), but when I do that and then try to compile it gives me the following errors:

Cannot open include file: 'Windows.h': No such file or directory

Could not find WindowsSdkDir_71A variable from registry. TargetFrameWorkVersion or Platform toolset may be set to an invalid version number.

How can I compile with this toolset version?

Community
  • 1
  • 1
Bart
  • 717
  • 1
  • 9
  • 28

1 Answers1

6

After setting the Platform Toolset to Visual Studio 2015 - Windows XP (v140_xp), you close VS 2015 and reopen your project. It will automatically give a pop up that will tell you to install some files for supporting Windows XP projects.

MicroVirus
  • 5,324
  • 2
  • 28
  • 53
Bart
  • 717
  • 1
  • 9
  • 28
  • When I reloaded the solution after changing the toolset, it said "MyProject (unavailable)" in the project explorer. Right-clicking and choosing "Install Missing Feature(s)" will initiate the support update. – MicroVirus Jun 16 '16 at 11:41
  • 1
    I have the same problem with missing windows.h when using v140_xp and nothing suggested here works. – Pavel P Aug 01 '17 at 15:10