How to publish a. net core project on centos, centoscore

Source: Internet
Author: User
Tags centos server

How to publish a. net core project on centos, centoscore

Environment:
Operating System: centos 7
. Net core: 2.1.101

Official Website example address: https://docs.microsoft.com/zh-cn/dotnet/core/linux-prerequisites? Tabs = netcore2x

First, create an asp.net core web project in VS 2017 in windows. Then, we can choose two methods to publish the website. One is to use VS and then right-click to publish, and the other is to use the dotnet publish command. Upload the generated file to the server:

But there is a problem, my.. net core test project is written in VS 2017, and in. net core depends on dll are directly used to obtain the latest official Microsoft.. net core version and its dependencies.
The problem occurs when we install the dotnet core SDK on the centos server, because we usually specify the dotnet core version, which is generally not the latest version. Therefore, at this time, there will be problems. Once the test is run, an error will be reported:

How can this problem be solved? Download the latest dotnet core. You can find the ** deps. json file in the released file to view the version number of our project's dependent dll.

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.