It looks like whatever MSBuild variable is in the script before “/Microsoft.Cpp.Default.props
” is not set. Can’t say anything more specific without seeing the build, so the following are guesses.
First, I don’t see os: windows
and mono:
/dotnet:
– so it’s probable that you’re running the job in Linux with a default version of Mono installed while you probably want Windows with VS build tools.
https://stackoverflow.com/questions/50308833/trace-execution-of-msbuild-toolchain-scripts shows that this happens when
- the version of VS build tools required by your project is missing
- install it with Chocolatey, check https://docs.travis-ci.com/user/reference/windows/ and Windows builder snapshot 1809 for what is preinstalled; and/or when
- you’re running an older MsBuild from .NET Framework installation rather than the one from VS installation
- run it with full path or prepend its directory to
PATH
. Again, see Windows builder snapshot 1809 to find out the path.
- run it with full path or prepend its directory to
To diagnose the problem properly, run MsBuild with diagnostic output and tracing and upload the trace log somewhere for examination – to find out which exact variable it is and how the stock logic tries to fill it (most probably, by consulting the registry for VS installation paths).