Failed to initialize CoreCLR when depsfile path is relative
Steps to reproduce
dotnet exec --depsfile $relativePath ....
I hit this execution path in Visual Studio where build-base-path is set to a relative folder ..\..\artifacts and trying to execute the command spec created with ProjectDependenciesCommandFactory.
Specifying an absolute path for the buildBasePath constructor argument on this factory (which in turn changes the depsfile path) fixes the error.
Expected behavior
Find and load execute depspath relative to current working directory.
Actual behavior
Failed to initialize CoreCLR, HRESULT: 0x80070057
Environment data
dotnet --info output:
.NET Command Line Tools (1.0.0-rc2-002485)
Product Information:
Version: 1.0.0-rc2-002485
Commit Sha: d3c65aee87
Runtime Environment:
OS Name: Windows
OS Version: 10.0.10586
OS Platform: Windows
RID: win10-x64
going to begin investigating this,
@natemcmaster is it possible for you to share the full dotnet exec command line which is invoked but fails?
@brthor here is a repro: https://github.com/natemcmaster/dotnet-sample-tool/tree/issue/2682 Run build.ps1 on the project. Here is my output:
Running C:\Users\namc\dev\dotnet-sample-tool\.dotnet\dotnet.exe exec --depsfile C:\Users\namc\.nuget\packages\.tools\dotnet-my-tool\1.0.0-tmp1461606720.19358\netcoreapp1.0\dotnet-my-tool.deps.json --additionalprobingpath C:\Users\namc\.nuget\packages C:\Users\namc\.nuget\packages\dotnet-my-tool\1.0.0-tmp1461606720.19358\lib\netcoreapp1.0\dotnet-my-tool.dll --build-base-path ..\artifacts\
Process ID: 41820
Called as a tool. Dispatching to dependency command inside project.
Running C:\Users\namc\dev\dotnet-sample-tool\.dotnet\dotnet.exe exec --runtimeconfig ..\artifacts\SamplePortableApp\bin\Debug\netcoreapp1.0\SamplePortableApp.runtimeconfig.json --depsfile ..\artifacts\SamplePortableApp\bin\Debug\netcoreapp1.0\SamplePortableApp.deps.json --additionalprobingpath C:\Users\namc\.nuget\packages C:\Users\namc\.nuget\packages\dotnet-my-tool\1.0.0-tmp1461606720.19358\lib\netcoreapp1.0\dotnet-my-tool.dll --dispatch --verbose
Process ID: 18536
Failed to initialize CoreCLR, HRESULT: 0x80070057
thanks @natemcmaster !
Yo @brthor my referenced PR above fixes it in the host. Do you want to fix it by not passing relative paths?
Is this fixed @schellap ?
The host fix is in, so closing.