简体   繁体   中英

How to migrate from .NET Framework 4.6 to .NET Core 3.1

I created a new project in VS 2019 in .NET Framework 4.6 and now I want to upgrade it to .NET Core 3.1.

I do not want to do manually because their is ton of code.

How can I do this?

Microsoft published a guide for porting .NET Framework applications to .NET Core:

In a nutshell, it boils down to the following:

  1. Manually convert your dependency and project files.
  2. Ensure that all your dependencies are compatible with .NET Core.
  3. Use the .NET Portability Analyzer to find out if you are using features which are not supported in .NET Core.
  4. Use the .NET API analyzer to find out if you are using features which are not supported on some platforms.
  5. Target .NET Core, fix compile errors and test.

The guide contains detailed descriptions for specific steps (eg, how to port your WinForms/WPF UI code), which are too long to paraphrase in an SO answer, so be sure to read it carefully.

I do not want to do manually because their is ton of code.

Then you'll have to pay a developer to do that for you. Sorry, but at the time of writing, there is no fully automated .NET Framework -> .NET Core converter available.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM