I created a VS 2017 project for my driver, using the 'Empty WDM Driver' template. I then added a .cpp file and three .h files to the project.
Two strange things are happening.
1. I cannot run the Compile command on the .cpp file, either from the open window for the file, or from the context menu in Solution Explorer.
2. Build / Clean (or Rebuild, which does a Clean first) removes all the files from the project directory, including the project file itself and the .inf file generated by the driver template when I created the project. Fortunately, I put all these files into source control, so I can get them back (although if I have uncommitted changes, I will lose these).
The Build / Build (F7) command works fine. It compiles the .cpp file, links to another referenced project, and signs the .sys output file.
Is there something special about a WDM driver project that I should know about?