.NetFramework轉.NetCore過程(-) upgrade-assistant


https://docs.microsoft.com/en-us/dotnet/core/porting/upgrade-assistant-overview
NET 升級助手概述。
如何安裝 .NET 升級助手。
https://docs.microsoft.com/en-us/dotnet/core/porting/upgrade-assistant-aspnetmvc
演示如何針對 .NET Framework ASP.NET MVC 應用程序運行該工具

安裝升級助手
dotnet tool install -g upgrade-assistant

在需要打開powershell窗口的文件夾下空白處: shift + 鼠標右鍵

3、執行升級命令
upgrade-assistant upgrade .\Fooww.Web.WebApi.csproj

4、操作升級步驟(英文)
Upgrade Steps

Entrypoint: E:\Repo\FoowwWeb\Fooww.Web.WebApi\Fooww.Web.WebApi.csproj
Current Project: E:\Repo\FoowwWeb\Fooww.Web.WebApi\Fooww.Web.WebApi.csproj

  1. [Next step] Back up project
  2. Convert project file to SDK style
  3. Clean up NuGet package references
  4. Update TFM
  5. Update NuGet Packages
  6. Add template files
  7. Upgrade app config files
    a. Convert Application Settings
    b. Convert Connection Strings
    c. Disable unsupported configuration sections
  8. Update Razor files
    a. Apply code fixes to Razor documents
    b. Replace @helper syntax in Razor files
  9. Update source code
    a. Apply fix for UA0002: Types should be upgraded
    b. Apply fix for UA0012: 'UnsafeDeserialize()' does not exist
  10. Move to next project

Choose a command:

  1. Apply next step (Back up project)
  2. Skip next step (Back up project)
  3. See more step details
  4. Select different project
  5. Configure logging
  6. Exit

[16:54:13 INF] Saving upgrade progress file at E:\Repo\FoowwWeb\Fooww.Web.WebApi.upgrade-assistant
PS E:\Repo\FoowwWeb\Fooww.Web.WebApi>

5、 Convert project file to SDK style
處理源碼
【<Project 】替換為【<Project Sdk="Microsoft.NET.Sdk" 】

6、Clean up NuGet package references


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM