camke Error cmake failed to get the value of VCTargetsPath with VS2019 RRS feed

  • Question

  • Hey guys,
    I’m using the latest CMake Version fpr Windows 10 64 Bit (at the moment this is 3.18.2) and the latest VS2019 version (16.7.3)
    Now when i run the Cmake generator with the following cmd

    cmake -G Visual Studio 16 
    xxx my other sources

    this gives me the error

    CMake Error at CMakeLists.txt:40 (project):

    Failed to run MSBuild command:
    C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/MSBuild/Current/Bin/MSBuild.exe
    to get the value of VCTargetsPath:
    Microsoft (R)-Build-Engine, Version 16.7.0+b89cb5fde f├╝r .NET Framework
    Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

    now when I install an older version of VS2019 everything works fine. Do you have some hint for me where to look for the problem?

    Edit: I allready tried to Run MSBuild via Console
    For that I created a simple console application with “hello world”
    MSBuild.exe ConsoleApplication1.sln
    works fine

    Monday, September 14, 2020 3:01 PM