Publish a Windows system-compiled. NET Core program to the Ubuntu system

Source: Internet
Author: User
Tags dotnet
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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.