Isn't .net core 2.1.4 backward compatible with 2.1.1?

create a new demo project testdotnetcore2, with the asp.net core webapi template in visual studio 2017 and publish it to the remote server (Tencent Cloud server CentOS 7).

then when dotnet testdotnetcore2.dll is run on the release directory of Tencent Cloud server, the following error is prompted:

It was not possible to find any compatible framework version
The specified framework "Microsoft.AspNetCore.App", version" 2.1.1" was not found.
-Check application dependencies and target a framework version installed at:

/

-Alternatively, install the framework version "2.1.1.

2.1.12.1.4:

isn"t .net core 2.1.4 backward compatible with 2.1.1?

=
20181028 add:

Note: in fact, the "version 2.1.1 not found" in the screenshot of the question refers to the failure to find "version 2.1.1 of Microsoft.AspNetCore.App", not "version 2.1.1 of .net core". Microsoft.AspNetCore.App is a dependency of the webapi project created by asp.net core (included in. Net core).

after tossing about for two days, it was finally solved.

remember one thing: do not use the yum install described in most tutorials online to install the version of sdk, and / or the version of its dependency package installed on the server, which is likely to be inconsistent with the version installed by the client, resulting in an error.

solution steps:

1) first delete the dotnet-sdk:yum remove dotnet* that was previously installed on the server through yum install

2) download the Windows installer (.NET Core Installer;) of SDK with the same version number (e.g. 2.1.403) and the same platform architecture (e.g. x64) on the Microsoft official website page or Microsoft Github release page , respectively. The client can download the corresponding Mac version with Mac) and Linux binary (. NET Core Binaries) (Note: SDK contains the matching Runtime, so there is no need to download another Runtime):

Windows;
Linux(url):wget https://download.visualstudio.microsoft.com/download/pr/e85de743-f80b-481b-b10e-d2e37f05a7ce/0bf3ff93417e19ad8d6b2d3ded84d664/dotnet-sdk-2.1.403-linux-x64.tar.gz

3) install separately:

Windowsexe;
Linux([][5]):
    mkdir -p $HOME/dotnet && tar zxf dotnet-sdk-2.1.403-linux-x64.tar.gz -C $HOME/dotnet
    export DOTNET_ROOT=$HOME/dotnet 
    export PATH=$PATH:$HOME/dotnet
    
    :.bashrc.zshrcshell

4) when the client publishes the asp.net core application using visual studio, pay attention to select the version just installed (if multiple different versions are installed), publish it to the server, and run the startup service on the server, it should be normal.


Thank you. I have been working on Tencent's CVM all afternoon today. I always think that my local machine is a netcore2.1.1 version. Thank you very much.
if you don't mind, you can make a friend QQ:1052231926

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea24f6-1bcb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea24f6-1bcb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?