VS: DOTNET_SDK support for core msbuild attributes
In a recent issue on DOTNET_SDK
support, @rainersigwald proposed looking at core MSBuild attributes. This issue tracks the support for each of those attributes. Below is a slight edit of
-
VS_DOTNET_DOCUMENTATION_FILE
-
VS_DOTNET_REFERENCE_
-
VS_DOTNET_REFERENCEPROP_
-
VS_DOTNET_REFERENCES
(ideally only when targeting .NET Framework and error if targeting .NET Core/.NET 5.0+) -
VS_PACKAGE_REFERENCES
-
DOTNET_TARGET_FRAMEWORK
-
VS_GLOBAL_ROOTNAMESPACE
-
VS_GLOBAL_<variable>
Additionally, I think it does not make sense to support
-
DOTNET_TARGET_FRAMEWORK_VERSION
, since that's tied to .NET Framework and shouldn't be used for .NET Core/.NET 5.0+ projects (preferDOTNET_TARGET_FRAMEWORK
's specification of a target framework moniker instead) -
VS_PROJECT_IMPORT
, since imports from NuGet packages should be handled bydotnet restore
/MSBuild.exe -restore
There are also a couple of new things to consider supporting:
-
Runtime identifier, the .NET Core/.NET 5.0+ mechanism for supporting target OS/OS version/architecture. For RuntimeIdentifier
, CMake supports it viaVS_GLOBAL_RuntimeIdentifier
. I am hesitant adding another variable.
FYI @baronfel