none
Msbuild command line build issue (Visual Studio 2017) RRS feed

  • Question

  • Hello,

    I have recently upgraded from Visual Studio 2015 and WDK/SDK 1703 to Visual Studio 2017 WDK/SDK 1809 (though I also have SDK 1903 installed).

    Fortunately, building driver projects from the IDE presents no issue, but using msbuild from the command line seems to have broken for me.  I'm not sure where the issue is, so I'll include just basic information at the moment.

    From the vcxproj file (KMDF 1.9):

    ToolsVersion="12.0"

    <WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>

    <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>

    Yet this command line fails:

    msbuild myProj.sln /verbosity:d /t:clean /t:build /p:Configuration=Release /p:Platform=x64 > output.txt

    I think that things go haywire at this point:

    Building with tools version "12.0".
    Project file contains ToolsVersion="12.0". This toolset may be unknown or missing, in which case you may be able to resolve this by installing the appropriate version of MSBuild, or the build may have been forced to a particular ToolsVersion for policy reasons. Treating the project as if it had ToolsVersion="4.0".

    resulting in:

    "error MSB8008: Specified platform toolset (WindowsKernelModeDriver10.0) is not installed or invalid.

    Building from the IDE in verbose yields this output:

    Project file contains ToolsVersion="12.0". This toolset may be unknown or missing, in which case you may be able to resolve this by installing the appropriate version of MSBuild, or the build may have been forced to a particular ToolsVersion for policy reasons. Treating the project as if it had ToolsVersion="15.0"

    Of course, changing to ToolsVersion = "15.0" in the vcxproj did not work, but yielded this result from the command line:

    Project file contains ToolsVersion="15.0". This toolset may be unknown or missing, in which case you may be able to resolve this by installing the appropriate version of MSBuild, or the build may have been forced to a particular ToolsVersion for policy reasons. Treating the project as if it had ToolsVersion="4.0".

    Building a new template KMDF driver from the command line yielded the same result, which suggests that my installation is FUBARred somehow (msbuild or command line components(s)?).

    I tried to uninstall and re-install WDK 1809, but to no effect.

    Could anyone give me a clue as to what I should try to uninstall/re-install, and in what order, or how else to approach this problem?  

    Thanks for any suggestions/help,

    Philip Lukidis

    Monday, November 25, 2019 2:48 PM