The cross-targeting / SDK project type offer new functionality that a build extension may want to detect in order to reliably leverage (as opposed to setting properties and blindly hoping the new functionality is present).
Please define a new property that a build extension can check for to detect the use of the new SDK attribute in the project file.
Per a brief side discussion on #528 with @nguerrera.
More than just a property, we need to know how to call it when referring to it in documentation. It needs a "marketing name" too.
I'd suggest defining a property that indicates the version number of the .NET SDK that is being used. That way if a NuGet package depends on functionality in a new version of an SDK, the package can have MSBuild logic that will generate an error saying you need to use a newer SDK if the current version isn't high enough.
@dsplaisted Makes sense. Which version should we use? I think it should be System.Version parse-able to be friendly to msbuild's support for semantically correct comparisons of those.
@nguerrera yes, I think it should be a System.Version version, and it would be nice to have another property indicating the semantic version suffix (ie "alpha-1234" or whatever)
+1 to this. I'm actually blocked on this. I'm creating a nuget package that needs to understand if its in nuget2 vs nuget3 vs nuget4 mode. I thought I had a good condition for this: dotnet/standard@09e9f9e#diff-de762529dcf068a5867280f815198927R9 but it looks like the properties I was using are actually set by targets imported after those imported by NuGet packages so my condition doesn't work 😕. Can you please set a property in .props that indicates the project is in PackageReference mode?