VS 2017: fatal error RC1015: cannot open include file 'winres.h'

17,709

Solution 1

I just also came across this issue. It seems my friend missed to push some VS 2017 meta file to the server. My quick solution is to change the Windows SDK version to match the Windows 10 OS version or below. enter image description here

You can check your OS version from the cmd tool. enter image description here

Solution 2

Jeff T. answer is great if you have a single project.

If you have many projects in which you have to change the target Windows SDK (or if you want to make sure they all match), you'll probably prefer to use the Retarget Solution button found when right clicking on the solution: 1. Right click on solution, 2. "Retarget Solution"

Then just select some Windows SDK version that you have installed, and apply it to all (or whatever) projects you need to change: 3. List of Windows SDK to choose and apply to all projects

That list of Windows SDK versions will probably show some that don't really work. You might have to try.

Solution 3

You should install the framework MFC
enter image description here

Share:
17,709
c00000fd
Author by

c00000fd

You can contact me at webdc2000 [ a t ] hotmail.com

Updated on June 05, 2022

Comments

  • c00000fd
    c00000fd almost 2 years

    I just downloaded Visual Studio 2017 and converted my dialog-based C++/MFC project with it (from Visual Studio 2008 SP1.) But then when I go to Resources it shows this error:

    fatal error RC1015: cannot open include file 'winres.h'

    enter image description here

    And idea how to fix this?

  • Vizor
    Vizor almost 5 years
    I recommend this solution before manually adding a specific location.