Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Define a property to identify the cross-targeting/SDK project type #534
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.
changed the title from
A property should be defined to identify the cross-targeting/SDK project type
Define a property to identify the cross-targeting/SDK project type
Dec 19, 2016
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.
+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