samples icon indicating copy to clipboard operation
samples copied to clipboard

hosting sample: The specified runtimeconfig.json [/xyz/bin/Debug/DotNetLib.runtimeconfig.json] does not exist

Open jmp75 opened this issue 5 years ago • 1 comments

hosting sample at commit https://github.com/dotnet/samples/commit/d7a66aea125b22be11dc717921a802630fcaca46 on debian-x64 with .NET5 sdk installed

Issue description

following readme instructions dotnet run leads to:

The specified runtimeconfig.json [/home/abcdef/src/tmp/testsparse/net5host/bin/Debug/DotNetLib.runtimeconfig.json] does not exist
Init failed: 0x80008093
nativehost: /home/abcdef/src/tmp/testsparse/net5host/src/NativeHost/nativehost.cpp:89: int main(int, char**): Assertion `load_assembly_and_get_function_pointer != nullptr && "Failure: get_dotnet_load_assembly()"' failed.

The file /home/abcdef/src/tmp/testsparse/net5host/bin/Debug/net5.0/DotNetLib.runtimeconfig.json appears to have been created by the build phase though.

Will submit a PR if I find a fix.

Target framework

  • [ x] .NET Core
dotnet --info output
.NET SDK (reflecting any global.json):
 Version:   5.0.101
 Commit:    d05174dc5a

Runtime Environment:
 OS Name:     debian
 OS Version:  
 OS Platform: Linux
 RID:         debian-x64
 Base Path:   /home/abcdef/dotnet/sdk/5.0.101/

Host (useful for support):
  Version: 5.0.1
  Commit:  b02e13abab

.NET SDKs installed:
  2.1.811 [/home/abcdef/dotnet/sdk]
  3.1.404 [/home/abcdef/dotnet/sdk]
  5.0.101 [/home/abcdef/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.All 2.1.23 [/home/abcdef/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.23 [/home/abcdef/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.10 [/home/abcdef/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.1 [/home/abcdef/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.23 [/home/abcdef/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.10 [/home/abcdef/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.1 [/home/abcdef/dotnet/shared/Microsoft.NETCore.App]

jmp75 avatar Dec 25 '20 02:12 jmp75

this runtimeconfig.json is at INSTALL_DIRECTORY/dotnet/sdk/<version>/dotnet.runtimeconfig.json, in my case it was at: C:\Program Files\dotnet\sdk\7.0.101\dotnet.runtimeconfig.json

Rablidad avatar Mar 28 '23 03:03 Rablidad