SDK样式.csproj for .NET完整框架

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

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

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

最佳答案 至于为什么,这里是来自
GitHub问题的
an excerpt,涵盖了其中的一些(
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.

如果它适合你,那很好,但它不受支持,你肯定会遇到一些陷阱.

点赞