简体   繁体   English

是否有任何快速方法可以将.net框架项目更改为.net核心项目?

[英]Is there any quick way to change .net framework projects to .net core projects?

I have a solution with 58 projects. 我有58个项目的解决方案。 1 mvc projects and others are .net libraries (.net frameowrk 4.6.2 dlls). 1个mvc项目和其他项目都是.net库(.net frameowrk 4.6.2 dll)。 2 projects have nuget packages... 2个项目有nuget软件包...

Is there any quick way to change .net framework to .net core ? 有什么快速的方法可以将.net框架更改为.net core?

I mean do I have to create new project and create 57 projects ( +1 mvc core) and add cs files in them ? 我的意思是我必须创建一个新项目并创建57个项目(+1 mvc核心)并在其中添加cs文件吗?

Note : I know, I need to look at some nuget packages to support .net core and I have a lot of work for mvc core too. 注意 :我知道,我需要查看一些支持.net core的nuget包,并且对于mvc core也有很多工作。

Unfortunately, there is no quick way to migrate from .NET Framework to .NET Core, I migrate medium solution with 4 projects and it is was not fun, all work should be done manually. 不幸的是,没有从.NET Framework迁移到.NET Core的快速方法,我迁移了包含4个项目的中等解决方案,这很不好玩,所有工作都应该手动完成。

If we check the docs about porting to .NET Core there is nothing quick and easy. 如果我们查看有关移植到.NET Core文档,那么没有任何快捷简便的方法。 Even just 1st item in the list could be real pain, especially in big projects. 即使是列表中的第一项也可能是真正的痛苦,特别是在大型项目中。

  1. Identify and account for your third-party dependencies. 确定并说明您的第三方依赖性。

    This will involve understanding what your third-party dependencies are, how you depend on them, how to see if they also run on .NET Core, and steps you can take if they don't. 这将涉及了解您的第三方依赖项是什么,如何依赖它们,如何查看它们是否也可以在.NET Core上运行以及是否可以运行。

There only little help comes from API Portability Analyzer tool , but it is just show you report how you codebase is portable, but port process still should be done manually. API Portability Analyzer工具几乎没有什么帮助,但这只是显示您报告代码库的可移植性,但移植过程仍应手动完成。

For my migration I used advised approach from this discussion on GitHub and looked at reports from API Portability Analyzer tool: 对于我的迁移,我在GitHub上的讨论中使用了建议的方法,并查看了API Portability Analyzer工具的报告:

  1. dotnet new a core template dotnet new的核心模板
  2. Add stuff to it until it builds your project 向其中添加内容,直到构建您的项目为止
  3. delete the old csproj file 删除旧的csproj文件

暂无
暂无

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

相关问题 是否有任何 c# .Net Framework 项目可以为我的 .Net Core 项目提供回调/响应? - Are there any c# .Net Framework projects that can provide callbacks/responses to my .Net Core project? .NET和.net核心在项目之间共享文件 - .NET and .net core share file among projects 是否可以使用Dot Net来识别VC ++项目? - Is there any way to identify a VC++ Projects using Dot Net or not? .NET Core SDK与在.NET Framework项目中使用.NET Standard库有什么关系? - How is the .NET Core SDK related to using .NET Standard libraries in .NET Framework projects? Is there a way to restrict .NET Core projects to generate only.dll as output files when using .NET Core 3.1 sdk - Is there a way to restrict .NET Core projects to generate only .dll as output files when using .NET Core 3.1 sdk 将ASP.Net Core 2(.NET Framework)Web Api拆分为类库和托管项目是否可行/明智? - Is it possible/sensible to split ASP.Net Core 2 (.NET Framework) Web Api into Class Library and Hosting projects? 在同一解决方案文件中同时包含 .NET Framework 和 .NET Core 项目的 Azure DevOps 中构建 .sln - Building .sln in Azure DevOps that has both .NET Framework and .NET Core projects in the same solution file 混合 .NET 核心和 .NET 框架项目时无法获取项目参考的依赖项 - Could not get dependencies for project reference when mixing .NET Core and .NET Framework projects 在 .NET Core 和 .NET 框架应用程序中使用库项目时,转换库项目的最佳选择是什么? - What is the best option to convert library projects when using them in both .NET Core & .NET Framework Applications? 使用.NET Core的混合语言和子项目 - Mixed languages and sub-projects with .NET Core
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM