asp.net Core 1.0 Upgrade 2.0

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


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.