Native tools bootstrap failed
See original GitHub issueProblem description:
When I tried to run build.cmd to compile , I always got the messages like this:
Processing D:\Repos\wpf\global.json strawberry-perl was not found in C:\Users\bruceshen\.netcoreeng\native\bin\strawberry-perl\5.28.1.1-1. net-framework-48-ref-assemblies was not found in C:\Users\bruceshen\.netcoreeng\native\bin\net-framework-48-ref-assemblies\0.0.0.1. Native tools bootstrap failed Attempting to install dotnet from public location. dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where: dotnet-install: - The SDK needs to be installed without user interaction and without admin rights. dotnet-install: - The SDK installation doesn’t need to persist across multiple CI runs. dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.
I checked the installation path, confusingly, the native tools were successfully installed, so I had to consider that this was a bug. Turns out, I was right.
See the code of power shell script in install-tool.ps1, it assumes all native tools are executable and have the name of $ToolName. In fact, the executable file name of strawberry-perl is perl.exe, even more net-framework-48-ref-assemblies is just a library.
$ToolFilePath = Get-ChildItem $ToolInstallDirectory -Recurse -Filter "$ToolName.exe" | % { $_.FullName }
if (@($ToolFilePath).Length -Gt 1) {
Write-Error "There are multiple copies of $ToolName in $($ToolInstallDirectory): `n$(@($ToolFilePath | out-string))"
exit 1
} elseif (@($ToolFilePath).Length -Lt 1) {
Write-Host "$ToolName was not found in $ToolInstallDirectory."
exit 1
}
Actual behavior:
Expected behavior:
Minimal repro:
Issue Analytics
- State:
- Created a year ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
@pchaurasia14 I see, that misled you. My path is actually
C:\Users\bruceshen\.netcoreeng
, it’s no problem. Now we can focus on the actual error and cause I mentioned in the issue description.@binary2015nov - Your previous comment mentioned the error in the path from your end. Hence, assumed that would be the cause of the problem.
Nevermind, we’ll investigate this at our end.