Trying to execute a dll with dotnet exec or run a project with dotnet run fails with "Failed to create CoreCLR, HRESULT: 0x80070057", when one of the dependencies of that dll has a "runtime" with a non default file extension (e.g. ".asi" in my case)
To Reproduce
Create a console application A with dotnet new console
Create a library B with dotnet new classlib
Add a <TargetExt>.asi</TargetExt> to B.csproj
Add a <ProjectReference/> in A to B
Either dotnet run A, or build A and then dotnet exec the build output binary
Exceptions (if any)
When running dotnet exec on the file, this error gets output: Failed to create CoreCLR, HRESULT: 0x80070057
Further technical details
An observation I made, after trial and erroring, is that removing the "libraries" entry of that offending library seems to "resolve" the issue, letting me execute the program.
Output of dotnet --info
.NET SDK:
Version: 7.0.202
Commit: 6c74320bc3
Runtime Environment:
OS Name: Windows
OS Version: 10.0.22621
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\7.0.202\
Host:
Version: 7.0.4
Architecture: x64
Commit: 0a396acafe
.NET SDKs installed:
7.0.202 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.All 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.21 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.15 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.21 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
Describe the bug
Trying to execute a dll with
dotnet exec
or run a project withdotnet run
fails with "Failed to create CoreCLR, HRESULT: 0x80070057", when one of the dependencies of that dll has a"runtime"
with a non default file extension (e.g. ".asi" in my case)To Reproduce
dotnet new console
dotnet new classlib
<TargetExt>.asi</TargetExt>
to B.csproj<ProjectReference/>
in A to Bdotnet run
A, or build A and thendotnet exec
the build output binaryExceptions (if any)
When running
dotnet exec
on the file, this error gets output:Failed to create CoreCLR, HRESULT: 0x80070057
Further technical details
An observation I made, after trial and erroring, is that removing the
"libraries"
entry of that offending library seems to "resolve" the issue, letting me execute the program.Output of
dotnet --info