1. Update VS2017
Upgrade from 1.5.2 to 1.5.3 (the installation file opened from the download VS2017 prompts for updates). \
2. Download Net Core 2.0 SDK
Download Address: https://download.microsoft.com/download/0/F/D/0FD852A4-7EA1-4E2A-983A-0484AC19B92C/ Dotnet-sdk-2.0.0-win-gs-x64.exe
3. Change the project's net Core 1.0 to 2.0
Hint "contains duplicate Content" items, reference: http://mamicode.com/info-detail-1960704.html Solution One: Add the following configuration items to the. csproj project file. Reboot solution compilation succeeded.
<PropertyGroup>
<EnableDefaultContentItems>false</EnableDefaultContentItems>
</ Propertygroup>
Note: This modification will reveal that there are no wwwroot, views, Appsettings.json, and other file solutions in the Publish file two: open the. csproj project file, including the file in the <content > code deleted, generally you will see the files in the wwwroot, are together, you can find according to this.
Then open the project again to see if the NuGet show yellow indicates that a package needs to be adjusted, will have the problem of the package to upgrade to 2.0, through debugging found that many of the previous no problem of the code is an error, this is because the method changed, this needs to change the parameters used, not 2.0 of the package to upgrade to 2.0.
Note: There is no Appsettings.json file in the current ASP.net Core 2.0 project release file, but this file still works. If some packages are upgraded to 2.0 errors (not supporting the current version), you can directly modify the version directly in the. csproj file, and then reopen the project. Publishing on IIS requires that, since the net core 1.1 is upgraded to Net Core 2.0, all items except the configuration file and the Wwwroot folder need to be replaced.