gpt4 book ai didi

.net - 适用于 .NET 完整框架的 SDK 样式 .csproj

转载 作者:行者123 更新时间:2023-12-04 04:14:38 25 4
gpt4 key购买 nike

有谁知道为什么在创建新的 .NET 完整框架项目时,Visual Studio(版本 15.9.2)仍然使用旧样式的 .csproj 文件?

为了解决这个问题,在创建新的完整框架项目时,我创建了一个 .NET 核心项目,然后简单地编辑 .csproj 中的 TargetFramework 标记以定位 net472(例如),从而利用新的简化结构。

有没有人看到这种方法有问题?

最佳答案

至于原因,这里是an excerpt来自涵盖其中一些内容的 GitHub 问题 ( Add support for ASP.NET (non-Core) projects #2670 ),尽管特定于有关 ASP.NET 的问题,而不是一般的 .NET Framework 项目:

Honestly I don't see this happening in the short term (this year). There are lots of kinks to work out with SDK projects and the new project system before we can bring them to older projects. Those kinks don't even have anything to do with ASP.NET so then there would be a bunch of work that needs to happen to port ASP.NET things to the new project system which is non trivial e.g. old razor editor, aspx editor, webforms designer??, build system (WAP projects have a hybrid msbuild + build manager build system), and any other quirks that System.Web requires. Some of those components are written in native code since the older project system was native.

All of this to say, it's not a simple flip the switch, it's the same set of people working on new and existing project systems. When the SDK projects are near flawless, I'd look at bringing it to down level projects.



简短版本:新的项目系统还不够成熟,还不能转移所有内容,而且这不会是一件小事。

还有关于您可能遇到的问题的评论 mixing old and new projects in the same solution (这对您来说可能不是问题,但对其他人来说值得一提):

We can't move because we can't even start to move the solutions. We can't move things to libraries on the new system and migrate over in any reasonable way, because the build system won't build both.



如果它对您有用,那很好,但它不受支持,而且您肯定会遇到一些陷阱。

关于.net - 适用于 .NET 完整框架的 SDK 样式 .csproj,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53406861/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com