Console App that refer an external dll
-
Hello to all, I'm developing a test console app that refers to an external dll, made with VS2022 and .net core 3.1. Th console App should work on debian 10 and an arm processor. I've installed all the netcore packages on debian, ad I've tested the "hello word" app in dotnet core. Now I'm trying to create a "single file" .netcore console application that uses an external dll. I've managed to have a "single file" application for the console app and a "single file" dll for the external library. Every time I try to start the console app the system gives me the error:
A fatal error occurred. The required library libhostfxr.so could not be found.
If this is a self-contained application, that library should exist in [/root/.net/SPLX/eY3MeD2sHDeSKgxGgVmzXD_NUUU2hdE=/].
If this is a framework-dependent application, install the runtime in the global location [/usr/share/dotnet] or use the DOTNET_ROOT environment variable to specify the runtime location or register the runtime location in [/etc/dotnet/install_location].The .NET Core runtime can be found at:
Anyone knows how to solve this? Thank you
-
Hello to all, I'm developing a test console app that refers to an external dll, made with VS2022 and .net core 3.1. Th console App should work on debian 10 and an arm processor. I've installed all the netcore packages on debian, ad I've tested the "hello word" app in dotnet core. Now I'm trying to create a "single file" .netcore console application that uses an external dll. I've managed to have a "single file" application for the console app and a "single file" dll for the external library. Every time I try to start the console app the system gives me the error:
A fatal error occurred. The required library libhostfxr.so could not be found.
If this is a self-contained application, that library should exist in [/root/.net/SPLX/eY3MeD2sHDeSKgxGgVmzXD_NUUU2hdE=/].
If this is a framework-dependent application, install the runtime in the global location [/usr/share/dotnet] or use the DOTNET_ROOT environment variable to specify the runtime location or register the runtime location in [/etc/dotnet/install_location].The .NET Core runtime can be found at:
Anyone knows how to solve this? Thank you
I'm not sure whether this question is still relevant but it misses the most crucial piece: how does your project reference your library. Anyways, the most convenient way of attaching external dependencies is Nuget package manager. You can learn more in official docs What is NuGet and what does it do? | Microsoft Docs[^]