Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple console app in .NET.Core - doesn't run
Message
 
 
À
Tous
Information générale
Forum:
C#
Catégorie:
Déploiements
Titre:
Simple console app in .NET.Core - doesn't run
Divers
Thread ID:
01674247
Message ID:
01674247
Vues:
48
Hi everybody,

I created a very simple .NET core console application. Just selected all defaults and created a very simple program to output details about files and number of lines in them.

I then just build the application directly in VS 2019. I see exe created in the debug folder.

However, when I try to run it I get this error

A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Program Files\dotnet'.

What should I do to create such a simple exe and being able to run it on my local computer and just copy the exe to run on others?

Thanks in advance.

UPDATE. When I searched for this error I found
https://stackoverflow.com/questions/38085430/the-library-hostpolicy-dll-was-not-found
which said to use obj folder instead of the bin.

I think I just now tried

bin\Debug\netcoreapp3.1 folder and the exe in it works for me now on my local laptop.

---------------------------
Unfortunately, it still doesn't work on other computer and the solution specified there is too complex for me :(
If it's not broken, fix it until it is.


My Blog
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform