Go to the project.json directory and publish:
It will print the output directory of the operation, enter the directory and run the published project:
dotnet <project output>.dll
The default folder will be:
<project root>/bin/<configuration>/<target framework>/publish
If you have built the project previously, you can publish using:
dotnet --no-build publish
Important: Make sure you publish the project from the same user who restored the packages or you might publish it without the required libraries.
You can specify the configuration with the
-c <Configuration> option. To publish in Release mode, use
dotnet publish -c Release.