Environment:
Operating system: CentOS 7
. NET core:2.1.101
Example address of the official website: https://docs.microsoft.com/zh-cn/dotnet/core/linux-prerequisites?tabs=netcore2x
First, under Windows vs 2017 new ASP. NET core Web project, then we can choose two methods to publish the site, one is to use VS and then right-click to publish, one is to use the dotnet Publish command. We upload the generated files to the server:
But there's a problem, my. NET Core test project is written in vs 2017, and the. NET core dependent DLLs under vs are all directly using NuGet to get Microsoft's latest. NET core version and its dependencies.
When we install the Dotnet Core SDK on the CentOS server, we have a problem, because generally this time we are designated dotnet core version, and generally not the latest version, so this time there will be a problem, once the test run will be error:
How to solve? Download the latest version of Dotnet Core and we can find the **deps.json file in our published file to view the version number of our project dependency DLL
How to publish a. NET Core project on the CentOS operating system