[英]Why properties of two .NET Framework 4.7.2 projects look different?
I have a solution with mostly C# Class Library (.NET Framework) projects.我有一个主要包含 C# 类库 (.NET Framework) 项目的解决方案。 I have added a new project to the solution (called Training
) for same the Target Framework (ie .NET Framework 4.7.2).我已经为相同的目标框架(即 .NET Framework 4.7.2)向解决方案(称为Training
)添加了一个新项目。 But as shown in the screenshot below, if I compare the properties of an old project (called Programming
) wrt the new project (called Training
) then, the different structure of the menu appears (maybe the information is same).但如下面的屏幕截图所示,如果我比较旧项目(称为Programming
)与新项目(称为Training
)的属性,则会出现不同的菜单结构(可能信息相同)。
Question: Why the Properties information look different for the same project type (class library) and same Target type in Visual Studio 2022?问题:为什么在 Visual Studio 2022 中相同项目类型(类库)和相同目标类型的 Properties 信息看起来不同?
The different dialogs are due to the project files being different kinds - there's the "old style" one (which is typically huge and lists every source file) and the "SDK-style" one (which is typically much smaller).不同的对话框是由于项目文件的种类不同——有“旧式”的(通常很大并列出每个源文件)和“SDK 式”的(通常小得多)。
To create a new SDK-style project, target .NET Core or .NET 5+ in the wizard - you can always change the TargetFramework
property to net472
or similar later.要创建新的 SDK 样式的项目,请在向导中将 .NET Core 或 .NET 5+ 作为目标 - 您以后始终可以将TargetFramework
属性更改为net472
或类似的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.