0

I'm trying to run a .net console application on Linux using .net core, I built this application on windows. these are the steps I took:

  1. Build the project in VS2015 .net 4.6.1 (Windows).
  2. Copy the output directory to Linux machine.
  3. Run the command dotnet QL3.exe

I get the following error message:

A fatal error was encountered. The library 'libhostpolicy.so' required to execute the application was not found in '/home/ubuntu/QL3'.

comment: when I take those same step but use mono the application runs.

Suggestions?

Roey Nissim
  • 555
  • 8
  • 25
  • @patrick-hofman I think the difference is that I'm not trying to build it in Linux but only run it. is it not allowed? must I build the project in Linux in order for it to work? – Roey Nissim May 16 '17 at 07:36
  • The other posts also says: "I get the following error when I do dotnet run", so the problem is in the running too, not the compiling. – Patrick Hofman May 16 '17 at 07:38
  • That is correct but I don't have this Project.json file, I just copied the output directory to the Linux machine and ran the exe (using dotnet command). I understand that I probably did something wrong I'm just trying to understand what. – Roey Nissim May 16 '17 at 07:44
  • You need the project file for compiling, which works in the duplicate. Ignore that. – Patrick Hofman May 16 '17 at 07:49
  • so if I ignore that all that left is update to 1.1.1, is that it? – Roey Nissim May 16 '17 at 07:56
  • Did you read the other answer? http://stackoverflow.com/a/38085431/993547 If that doesn't help, update your question and explain all steps you have done. – Patrick Hofman May 16 '17 at 07:57
  • I'm sorry but there is only one answer in the link you sent I read it (something to do with adding a property to the project.json which you said is not relevant to my problem). I updated my question if you still think its a duplicate I'm not saying that you're wrong but that doesn't mean that i don't still need help. – Roey Nissim May 16 '17 at 08:08

0 Answers0