VS2017 and VS2019. Error RC1015. Resource editor/viewer cannot find winres.h

  • Thread starter Thread starter cfgardiner
  • Start date Start date
C

cfgardiner

Guest
Since VS2017 (and now also with VS2019) I am having problems when trying to add a Version Resource object to any KMDF driver. This works fine with VS2015. Message box content is "Fatal Error RC1015: cannot open include file 'winres.h'"

Strangely, the projects all build OK but to update the Version assigned to the driver, I have to go back to the VS2015 Project and copy the modified <proj>.rc file into the vs2017 or vs2019 project workspaces. An extremely annoying way to have to work.

If I load the code of the <proj>.rc file into the editor and try to open "winres.rc" with the right-mouse button it says that the file cannot by found in the current Directory or in the build system path. In fact the build system path is shown as empty in the resulting pop-up message box. But the file winres.h is present in the directory pointed to by $(UM_IncludePath). I have tried adding this variable to c++/general/additional-include-paths and a few other places but it still is never found.

Looking at this forum and other places, this issue seems to keep cropping up over the last four or five years and Microsoft support claim they can't reproduce it. Since I now have a customer who insists on getting a VS2019 project for his driver, I have spent the last few days installing and updating all Vstudio/SDKs/WDKs from 1507 to 1903 (because I also have multiple legacy customers who still need support) and I find the issue perfectly reproducible on two systems, my 2008/R2/x64-Server workhorse and my laptop with the latest windows 10/x64. All I have to do is start an empty KMDF project from the template library and then try to add a Version Resource object to the project, before adding any other *.inf or source files. It's that simple to reproduce with both VS2017 and VS2019.

This all seems to be a problem with the search path used by the resource editor/resource viewer since I don’t have any problems actually building the projects. It’s just the editing and maintenance that’s screwed up.

Does anybody have an idea how to fix this? What exactly is the “Build System Path” i.e. the exact variable name and where/how can I set this?

Thanks for any ideas.

Continue reading...
 
Back
Top