简体   繁体   English

如何从 .NET Framework 4.6 迁移到 .NET Core 3.1

[英]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.我在 VS 2019 中的 .NET Framework 4.6 中创建了一个新项目,现在我想将其升级到 .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: Microsoft 发布了将 .NET 框架应用程序移植到 .NET 核心的指南:

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.确保您的所有依赖项都与 .NET Core 兼容。
  3. Use the .NET Portability Analyzer to find out if you are using features which are not supported in .NET Core.使用 .NET 可移植性分析器来确定您是否使用了 .NET 核心不支持的功能。
  4. Use the .NET API analyzer to find out if you are using features which are not supported on some platforms.使用 .NET API 分析器来确定您是否使用了某些平台不支持的功能。
  5. Target .NET Core, fix compile errors and test.以 .NET 内核为目标,修复编译错误并进行测试。

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.该指南包含对特定步骤的详细描述(例如,如何移植您的 WinForms/WPF UI 代码),这些描述太长而无法在 SO 答案中进行解释,因此请务必仔细阅读。

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.抱歉,在撰写本文时,没有全自动 .NET 框架 -> .NET 核心转换器可用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从 .netframework 4.6 迁移到 .Net core 3.1 - Migrate from .netframework 4.6 to .Net core 3.1 如何将我的代码从 .Net Framework 迁移到 .Net Core 3.1? - How do I migrate my code from .Net Framework to .Net Core 3.1? 如何使用托管在 .Net framework 4.6 应用程序中的登录页面对 .Net Core 3.1 上的 IdentityServer4 应用程序进行身份验证? - How to use login page hosted in .Net framework 4.6 application to authenticate for IdentityServer4 application on .Net Core 3.1? 将 .NET 内核从 2.2 迁移到 3.1 - Migrate .NET Core from 2.2 to 3.1 如何将 IdentityServer Bearer Token Authentication 从 asp.net 迁移到 .net core 3.1 - How to migrate IdentityServer Bearer Token Authentication from asp.net to .net core 3.1 尝试将 .net 核心项目从 2.2 迁移到 3.1 - Attempting to migrate the .net core projects from 2.2 to 3.1 是否可以将 .NET Core (.NET 6) 迁移到 .Net Framework? - Is possible migrate .NET Core (.NET 6) to .Net Framework? 将 .net 核心 2.2 迁移到 3.1 问题 - migrate .net core 2.2 to 3.1 issue 在Framework 4.6项目中使用.net核心DLL - Use .net core DLL in Framework 4.6 project 如何将MVC中的动态绑定代码从.NET Framework迁移到.NET Core? - How do I migrate dynamic binding code in MVC from .NET Framework to .NET Core?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM