locked
vs 2015 update 2 breaks build: fatal error C1083: Cannot open include file: 'winsdkver.h': No such file or directory RRS feed

  • Question

  • As in the title, after installed vs 2015 update 2 rtm, I cannot build any vs c++ solution:

    In debug I get

    fatal error C1083: Cannot open include file: 'winsdkver.h': No such file or directory

    In release:

    TRACKER : error TRK0005: Failed to locate: "midl.exe". The system cannot find the file specified.

    So the update 2 (installed over a working update1) messed up my system.

    How can we fix this?

    Monday, April 18, 2016 6:50 AM

Answers

  • Fixed.

    The solution has incorrect(?) VC++ Directories set.

    First I uninstalled the windows sdk, and repaired vs 2015. Created a default mfc application to compare by my project settings.

    Found that the non-compiling project VC++ directory settings missed all $(WindowsSdk_71A_*) variables. What was strange that when I edit some properties the inherited values shows $(WindowsSdk_71A_*) paths, maybe this is a bug in vs 2015 update 2.

    For all vc++ directory settings I selected <inherit from parent or project defaults>, and that fixed the compiler warnings.

    (For the error in the thread title I found bunch of solution by fixing registry settings. But that solutions not worked for me.)

    • Marked as answer by stmarti1 Tuesday, April 19, 2016 12:59 PM
    Tuesday, April 19, 2016 12:59 PM

All replies

  • Hi,

    Thank you for posting here.

     We should check if you have a Windows SDK installed. If not download it and please install it.

    If you want to use the v140 toolset, try to install corresponding version of windows SDK.

    Try to search your HDD for “winsdkver.h”

    Best Regards,

    Hart

    Tuesday, April 19, 2016 1:35 AM
  • Repaired vs 2015 -> not helps.

    Installed windows sdk -> not helps

    winsdkver.h present on the hard drive

    When I tried to change the platform toolset for the c++ project I got the following error:

    "An error has occured while saving the edited properties listed below: One or more values are invalid. Value cannot be null. Parameter name: userSuppliedValue"

    • Proposed as answer by 半青 Tuesday, November 8, 2016 6:28 AM
    • Unproposed as answer by 半青 Tuesday, November 8, 2016 6:28 AM
    Tuesday, April 19, 2016 10:57 AM
  • Fixed.

    The solution has incorrect(?) VC++ Directories set.

    First I uninstalled the windows sdk, and repaired vs 2015. Created a default mfc application to compare by my project settings.

    Found that the non-compiling project VC++ directory settings missed all $(WindowsSdk_71A_*) variables. What was strange that when I edit some properties the inherited values shows $(WindowsSdk_71A_*) paths, maybe this is a bug in vs 2015 update 2.

    For all vc++ directory settings I selected <inherit from parent or project defaults>, and that fixed the compiler warnings.

    (For the error in the thread title I found bunch of solution by fixing registry settings. But that solutions not worked for me.)

    • Marked as answer by stmarti1 Tuesday, April 19, 2016 12:59 PM
    Tuesday, April 19, 2016 12:59 PM
  • I have the same problem (Cannot open include file: 'winsdkver.h').

    Which SDK did you uninstall? Also my project is setup to build with platform toolset v140_xp. Is that how yours is as well?

    When I create a brand new project I do not see any $(WindowsSdk_71A_*) variables in the project file. Can you please elaborate? Did you have to change your project file to make it compile after the VS2015 Update 2 installation?

    This is driving me crazy. So far I've spent two full days after the update just trying to make normal things work. I appreciate any help you can give.

    Wednesday, June 1, 2016 11:45 AM