dknaack
dknaack

Reputation: 60556

Running a .NET Core Console Application on Mac or Windows

I've created a .NET Core console application. I want to build the app so that I can execute it on Windows or MacOS without dotnet core being installed on the machine. So I need e.g. for windows an exe.

I've read https://learn.microsoft.com/de-de/dotnet/articles/core/tools/dotnet-publish and I know how to compile the application for the different platform(s).

But no executable gets created. What am I missing here and how do I accomplish my goal?

Upvotes: 17

Views: 25787

Answers (1)

svick
svick

Reputation: 245028

What you need is to create a self-contained application. The link explains how exactly to modify your project.json to do that.

Also note that while a self-contained application does not have a dependency on .Net Core, it may have other dependencies. Specifically on OSX, I believe you will need to install a specific version of openssl from homebrew.

Upvotes: 13

Related Questions