I am working in Windows and want to build a dotnet core app on Windows to run on Linux. In the build folder, I see .DLL file references in the published folder, which would obviously not work on Linux - how do I compile the app from my Windows environment to run on Linux? Is it possible?
In the project.json file there is runtime versions specified, which I believe correlates to the runtimes in the C:\Program Files\dotnet\sdk\1.0.0-preview2-003121\runtimes location? If so, how do I get the Linux runtime installed in Windows and reference it?
NET Core runtime allows you to run applications on Linux that were made with .
NET Core is cross-platform. It runs on Windows, OS X and multiple distributions of Linux. It also supports different CPU architectures. We're adding more Linux distribution and CPU architecture support with the eventual goal of .
You can create self contained applications using publish command.
For example (.Net Core 2.0):
dotnet publish -c release -r win7-x64
dotnet publish -c release -r centos.7-x64
You need to specify win7-x64 OR centos.7-x64 in RuntimeIdentifiers
also in the .csproj
file.
For more help check this page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With