dotnet core building application for linux on a window
We can build a dotnet core application and target it to run on linux. Say your application is deployed on a linux container and you wanted to run additional testing on it, you can build your dotnet app to run on linux by simply running.
dotnet build --runtime linux-x64
Then run it with
dotnet my-dotnet-core-app.dll
If you get this error "Building a solution with a specific RuntimeIdentifier is not supported. If you
would like to publish for a single RID,"
Then you can try to use the following command to redo the build
dotnet build MySolution.sln -p:MyRuntimeIdentifier=linux- x64
Comments