runtime: Build with VS 2017 only doesn't work

I followed the instructions mentioned here: https://github.com/dotnet/coreclr/blob/master/Documentation/building/windows-instructions.md for Visual Studio 2017.

I don’t have VS 2015.

When calling build from Developer Command Prompt for VS 2017 I receive this error:

Running: C:\Users\myuser\Source\coreclr\Tools\dotnetcli\dotnet.exe C:\Users\myuser\Source\coreclr\Tools\run.exe C:\Users\myuser\Source\coreclr\config.json build -Project=C:\Users\myuser\Source\coreclr\build.proj -generateHeaderWindows -NativeVersionHeaderFile="C:\Users\myuser\Source\coreclr\bin\obj\_version.h" -BuildOS=Windows_NT -BuildType=Debug -BuildArch=x64
Running: C:\Users\myuser\Source\coreclr\Tools\msbuild.cmd /nologo /verbosity:minimal /clp:Summary /maxcpucount /nodeReuse:false  /l:BinClashLogger,Tools/net46/Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log  C:\Users\myuser\Source\coreclr\build.proj /p:__BuildType=Debug /p:__BuildArch=x64 /p:__BuildOS=Windows_NT  /t:GenerateVersionHeader /p:GenerateVersionHeader=true /p:NativeVersionHeaderFile=C:\Users\myuser\Source\coreclr\bin\obj\_version.h
MSBUILD : error MSB1021: Cannot create an instance of the logger. Could not load file or assembly 'Tools\/net46\/Microsoft.DotNet.Build.Tasks.dll' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
Switch: BinClashLogger,Tools/net46/Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log
Command execution failed with exit code 1.
BUILD: Restoring the OptimizationData Package
Tools are already initialized.
Running: C:\Users\myuser\Source\coreclr\Tools\dotnetcli\dotnet.exe C:\Users\myuser\Source\coreclr\Tools\run.exe C:\Users\myuser\Source\coreclr\config.json sync -optdata
Running: C:\Users\myuser\Source\coreclr\Tools\msbuild.cmd /nologo /verbosity:minimal /clp:Summary /maxcpucount /nodeReuse:false  /flp:v=detailed;LogFile=sync.log /t:RestoreOptData /p:RestoreDuringBuild=true  ./build.proj
MSBUILD : error MSB1009: Project file does not exist.
Switch: ./build.proj
Command execution failed with exit code 1.
BUILD: Error: Failed to restore the optimization data package.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 26 (26 by maintainers)

Most upvoted comments

I’m doing some tests and I will try to send a fix

Awesome.

@gkhanna79, It looks like there are two parts to a fix here:

  1. CoreCLR needs a fix similar to https://github.com/dotnet/corefx/pull/18700 so that users can build from any working directory
  2. Whatever parses the config.json should probably attempt to fully resolve the path and do so with regards to the repository root (this would result in full paths being passed in everywhere)