question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't run console application directly

See original GitHub issue

Steps to reproduce

Install the dotnet SDK, including openssl. Compile a hello world console app with mono. run it with dotnet hello-world.exe

Expected behavior

“Hello World” would be printed or the appropriate error would be printed. It looks like the problem is that my hello world references corlib directly.

Actual behavior

A fatal error was encountered. The library ‘libhostpolicy.dylib’ required to execute the application was not found in ‘xxxx’

Environment data

dotnet --info output: .NET Command Line Tools (1.0.0-preview2-003131)

Product Information: Version: 1.0.0-preview2-003131 Commit SHA-1 hash: 635cf40e58

Runtime Environment: OS Name: Mac OS X OS Version: 10.10 OS Platform: Darwin RID: osx.10.10-x64

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
JoseFMPcommented, Jun 21, 2017

+1 still happening over here.

3reactions
mellinoecommented, Sep 28, 2016

From a high-level perspective, it is kind of hard to give specific error messages for scenarios that were never considered, supported, or intended. Flipping this around, mono gives a similar un-helpful message if you try to run a .NET Core app with it:

Unhandled Exception:
System.IO.FileNotFoundException: Could not load file or assembly 'System.Console, Version=4.0.0.0, ..."

What sort of error message were you expecting in this case?

Read more comments on GitHub >

github_iconTop Results From Across the Web

C# console application won't run on other people's ...
One of them has C# installed, the other doesn't. The console app only ran on the computer of the friend that had C#...
Read more >
Rider in Mac can't run console app but runs in Windows
Try Running from Terminal: Try running the console application directly from the terminal using the dotnet run command. This might give you more ......
Read more >
Create a .NET console application using Visual Studio
Run the app · Press Ctrl + F5 to run the program without debugging. A console window opens with the text "Hello, World!"...
Read more >
A .NET Core 6 console app can't start another ...
A .NET Core 6 console app can't start another console app from within itself (using Process.Start()) in WSL (Windows Subsystem for Linux) while ......
Read more >
Why does Console App start when user runs it, but ...
I have a console application that can be run when a user executes it via the Windows Start Menu; however, if that same...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found