In terms of portability,. NET core applications are divided into two types, portable application (convenient, requires the target machine to install. NET core Runtime) and self-contained application (standalone, aka self-hosted. The target machine does not require a. NET Core Runtime), which can be referenced in the documentation: Https://docs.microsoft.com/zh-cn/dotnet/articles/core/app-types this time is to portable The app is released to Ubuntu 16.04 to run. The release method is divided into CLI (Command line Interface) release and with VS release. As mentioned in the previous blog post, A. NET Core program was created in Windows, which is now published, using the command dotnet publish-c release. Ps:.net Core command line Interface (CLI) is important, specific use can refer to the blog study: http://www.cnblogs.com/linezero/p/dotnet.html http://www.cnblogs.com/ shanyou/p/5636920.html
Publishing
using the CLI
Published successfully, some files are generated in the Hwapp folder
CD to the Publish directory, and then run the command: dotnet Hwapp.dll
To test the contents of a release file generated under Windows to Ubuntu
CD to the Publish directory, and then run the command dotnet Hwapp.dll
Copy the default address http://localhsot:5000 to the address bar to access
Run successfully!
Publish a Windows system-compiled. NET Core program to the Ubuntu system