hosting sample: The specified runtimeconfig.json [/xyz/bin/Debug/DotNetLib.runtimeconfig.json] does not exist
- Dominant language
- C#
- Stars
- 3.7k
- Forks
- 5.1k
- Avg merge
- 9h 11m
- Merged PRs (30d)
- 1
Description
[hosting sample](https://github.com/dotnet/samples/tree/master/core/hosting) 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:
```console
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
```console
.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]
```
Contributor guide
Assessment
This issue has not been assessed yet.