Error Building DotNet CoreCLR from source on Windows


#1

Hi,

I am new here but have been playing with DotNet Core for several months. Recently I have created the need to build the CoreCLR from source. I have followed the instructions here:

But I am getting an error early in the build process.

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or ass
embly ‘System.Runtime.Serialization.Primitives, Version=4.1.1.0, Culture=neutral
, PublicKeyToken=b03f5f7f11d50a3a’. The system cannot find the file specified.
at Newtonsoft.Json.JsonConvert.DeserializeObject
at Newtonsoft.Json.JsonConvert.DeserializeObject[T]
at Microsoft.DotNet.Execute.Executor.OpenFile()
at Microsoft.DotNet.Execute.Executor.Main(String[] args)
BUILD: Commencing build of native components for Windows_NT.x64.Debug
BUILD: Using environment: “C:\Program Files (x86)\Microsoft Visual Studio\2017\C
ommunity\Common7\Tools\…\VC\Auxiliary\Build\vcvarsall.bat” x86_amd64

I have spent a couple of evenings searching the internet trying to figure out what is going on here but to no avail. I am hoping that someone who has “been there and done that” can spot the issue.

Below is the complete output to my build process along with my environment variables.

FWIW the laptop I am trying this on is Running Windows 8.1 and I have installed all of the software required as per the above instructions link.

One last piece of information: I downloaded the CoreCLR repo as a ZIP file. I did not use GIT to fork it. Not sure if that is an issue or not.

Thank-you in advance for any help you can be.

Best,
Rod

C:\coreclr-master>build
Starting Build at 23:01:52.33
BUILD: Commencing CoreCLR Repo build
BUILD: Checking prerequisites
BUILD: Using environment: “C:\Program Files (x86)\Microsoft Visual Studio\2017\C
ommunity\Common7\Tools\VsDevCmd.bat”


** Visual Studio 2017 Developer Command Prompt v15.0.26430.12
** Copyright © 2017 Microsoft Corporation


Tools are already initialized.
Running: C:\coreclr-master\Tools\dotnetcli\dotnet.exe C:\coreclr-master\Tools\ru
n.exe C:\coreclr-master\config.json build -Project=C:\coreclr-master\build.proj
-generateHeaderWindows -NativeVersionHeaderFile=“C:\coreclr-master\bin\obj_vers
ion.h” -BuildOS=Windows_NT -BuildType=Debug -BuildArch=x64

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or ass
embly ‘System.Runtime.Serialization.Primitives, Version=4.1.1.0, Culture=neutral
, PublicKeyToken=b03f5f7f11d50a3a’. The system cannot find the file specified.
at Newtonsoft.Json.JsonConvert.DeserializeObject
at Newtonsoft.Json.JsonConvert.DeserializeObject[T]
at Microsoft.DotNet.Execute.Executor.OpenFile()
at Microsoft.DotNet.Execute.Executor.Main(String[] args)
BUILD: Commencing build of native components for Windows_NT.x64.Debug
BUILD: Using environment: “C:\Program Files (x86)\Microsoft Visual Studio\2017\C
ommunity\Common7\Tools\…\VC\Auxiliary\Build\vcvarsall.bat” x86_amd64
.
*** NOTE: Error Dialog pops here… dismissing allows build to carry on a little further…. *****


** Visual Studio 2017 Developer Command Prompt v15.0.26430.12
** Copyright © 2017 Microsoft Corporation


[vcvarsall.bat] Environment initialized for: 'x86_x64’
BUILD: Regenerating the Visual Studio solution
– VS_PLATFORM_TOOLSET is v141
– VS_PLATFORM_NAME is x64
– Configuring done
– Generating done
– Build files have been written to: C:/coreclr-master/bin/obj/Windows_NT.x64.De
bug
Tools are already initialized.
Running: C:\coreclr-master\Tools\dotnetcli\dotnet.exe C:\coreclr-master\Tools\ru
n.exe C:\coreclr-master\config.json build -Project=C:\coreclr-master\bin\obj\Win
dows_NT.x64.Debug\install.vcxproj -MsBuildLog=/flp:Verbosity=normal;LogFile=“C:
coreclr-master\bin\Logs\CoreCLR_Windows_NT__x64__Debug.log” -MsBuildWrn=/flp1:Wa
rningsOnly;LogFile=“C:\coreclr-master\bin\Logs\CoreCLR_Windows_NT__x64__Debug.wr
n” -MsBuildErr=/flp2:ErrorsOnly;LogFile=“C:\coreclr-master\bin\Logs\CoreCLR_Wind
ows_NT__x64__Debug.err” -configuration=Debug -BuildOS=Windows_NT -BuildType=Deb
ug -BuildArch=x64

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or ass
embly ‘System.Runtime.Serialization.Primitives, Version=4.1.1.0, Culture=neutral
, PublicKeyToken=b03f5f7f11d50a3a’. The system cannot find the file specified.
at Newtonsoft.Json.JsonConvert.DeserializeObject
at Newtonsoft.Json.JsonConvert.DeserializeObject[T]
at Microsoft.DotNet.Execute.Executor.OpenFile()
at Microsoft.DotNet.Execute.Executor.Main(String[] args)
BUILD: Error: native component build failed. Refer to the build log files for de
tails:
“C:\coreclr-master\bin\Logs\CoreCLR_Windows_NT__x64__Debug.log”
“C:\coreclr-master\bin\Logs\CoreCLR_Windows_NT__x64__Debug.wrn”
“C:\coreclr-master\bin\Logs\CoreCLR_Windows_NT__x64__Debug.err”

===================================
Environment Variables

ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\RodDaSilva\AppData\Roaming
BTSCOMMONFILES=C:\Program Files (x86)\Common Files\Microsoft BizTalk
BTSINSTALLPATH=C:\Program Files (x86)\Microsoft BizTalk Server 2013 R2
CLASSPATH=.;C:\Program Files (x86)\QuickTime\QTSystem\QTJava.zip
CommandPromptType=Cross
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=RODSSURFACE
ComSpec=C:\WINDOWS\system32\cmd.exe
DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE
ExtensionSdkDir=C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs
FP_NO_HOST_CHECK=NO
Framework40Version=v4.0
FrameworkDir=C:\WINDOWS\Microsoft.NET\Framework
FrameworkDIR32=C:\WINDOWS\Microsoft.NET\Framework
FrameworkDIR64=C:\WINDOWS\Microsoft.NET\Framework64
FrameworkVersion=v4.0.30319
FrameworkVersion32=v4.0.30319
FrameworkVersion64=v4.0.30319
HOMEDRIVE=C:
HOMEPATH=\Users\RodDaSilva
INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\ATLMFC\include;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\ucrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\shared;C:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\winrt;
lib=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\ATLMFC\lib\x64;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\lib\x64;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.15063.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.15063.0\um\x64;C:\Program Files (x86)\SQLXML 4.0\bin;C:\Program Files\SQLXML 4.0\bin
LIBPATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\ATLMFC\lib\x64;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\lib\x64;C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.15063.0;C:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0;C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319;
LOCALAPPDATA=C:\Users\RodDaSilva\AppData\Local
LOGONSERVER=\MicrosoftAccount
NETFXSDKDir=C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1
NUMBER_OF_PROCESSORS=4
OS=Windows_NT
Path=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\bin\HostX86\x64;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\bin\HostX86\x86;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\bin\Roslyn;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Team Tools\Performance Tools;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools;C:\Program Files (x86)\Windows Kits\10\bin\x86;C:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x86;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\bin;C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\QuickTime\QTSystem;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn;C:\Program Files\Microsoft SQL Server\110\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0;C:\Program Files\Microsoft SQL Server\120\Tools\Binn;C:\Program Files (x86)\Microsoft BizTalk Server 2013 R2;C:\Program Files (x86)\Microsoft BizTalk Server 2013 R2\Bins32;C:\Program Files (x86)\Microsoft BizTalk Server 2013 R2\Bins64;C:\Program Files (x86)\Skype\Phone;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio;C:\Program Files\dotnet;C:\Program Files\Git\cmd;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Users\RodDaSilva\AppData\Local\Programs\Python\Python36\Scripts;C:\Users\RodDaSilva\AppData\Local\Programs\Python\Python36;C:\Program Files\CMake\bin;C:\Users\RodDaSilva.nuget\packages
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
Platform=x64
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=3a09
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\PowerShell\Modules;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\PowerShell\Modules
PUBLIC=C:\Users\Public
QTJAVA=C:\Program Files (x86)\QuickTime\QTSystem\QTJava.zip
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\Users\RODDAS~1\AppData\Local\Temp
TMP=C:\Users\RODDAS~1\AppData\Local\Temp
UCRTVersion=10.0.15063.0
UniversalCRTSdkDir=C:\Program Files (x86)\Windows Kits\10
USERDOMAIN=RODSSURFACE
USERDOMAIN_ROAMINGPROFILE=RODSSURFACE
USERNAME=RodDaSilva
USERPROFILE=C:\Users\RodDaSilva
VCIDEInstallDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC
VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC
VCToolsInstallDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017
VCToolsRedistDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC\14.10.25017
VisualStudioVersion=15.0
VS110COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools
VS120COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools
VS140COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools
VS150COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools
VSCMD_ARG_app_plat=Desktop
VSCMD_ARG_HOST_ARCH=x86
VSCMD_ARG_TGT_ARCH=x64
VSCMD_VER=15.0.26430.12
VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community
windir=C:\WINDOWS
WindowsLibPath=C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.15063.0;C:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0
WindowsSdkBinPath=C:\Program Files (x86)\Windows Kits\10\bin
WindowsSdkDir=C:\Program Files (x86)\Windows Kits\10
WindowsSDKLibVersion=10.0.15063.0
WindowsSdkVerBinPath=C:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0
WindowsSDKVersion=10.0.15063.0
WindowsSDK_ExecutablePath_x64=C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\x64
WindowsSDK_ExecutablePath_x86=C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools
__DOTNET_ADD_32BIT=1
__DOTNET_ADD_64BIT=1
__DOTNET_PREFERRED_BITNESS=32
__VSCMD_PREINIT_PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\QuickTime\QTSystem;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn;C:\Program Files\Microsoft SQL Server\110\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0;C:\Program Files\Microsoft SQL Server\120\Tools\Binn;C:\Program Files (x86)\Microsoft BizTalk Server 2013 R2;C:\Program Files (x86)\Microsoft BizTalk Server 2013 R2\Bins32;C:\Program Files (x86)\Microsoft BizTalk Server 2013 R2\Bins64;C:\Program Files (x86)\Skype\Phone;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio;C:\Program Files\dotnet;C:\Program Files\Git\cmd;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Users\RodDaSilva\AppData\Local\Programs\Python\Python36\Scripts;C:\Users\RodDaSilva\AppData\Local\Programs\Python\Python36;C:\Program Files\CMake\bin


#2

Try to install with the command line NuGet the System.Runtime.Serialization.Primitives DLL

and add the DLL declaration on the config


#3

I think your best option is to post this as an issue on the coreclr repo. That way, you have the highest chance of being noticed by someone who can help you.


.NET Foundation Website | Blog | Projects | Code of Conduct