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
- [Next step] Back up project
- Convert project file to SDK style
- Clean up NuGet package references
- Update TFM
- Update NuGet Packages
- Add template files
- Upgrade app config files
a. Convert Application Settings
b. Convert Connection Strings
c. Disable unsupported configuration sections - Update Razor files
a. Apply code fixes to Razor documents
b. Replace @helper syntax in Razor files - Update source code
a. Apply fix for UA0002: Types should be upgraded
b. Apply fix for UA0012: 'UnsafeDeserialize()' does not exist - Move to next project
Choose a command:
- Apply next step (Back up project)
- Skip next step (Back up project)
- See more step details
- Select different project
- Configure logging
- 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
