.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
- [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