Define a property to identify the cross-targeting/SDK project type #534

Open
AArnott opened this Issue Dec 19, 2016 · 5 comments

Projects

None yet

7 participants

@AArnott
Contributor
AArnott commented Dec 19, 2016

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.

@AArnott AArnott changed the title from A property should be defined to identify the cross-targeting/SDK project type to Define a property to identify the cross-targeting/SDK project type Dec 19, 2016
@nguerrera nguerrera was assigned by srivatsn Dec 21, 2016
@srivatsn srivatsn added the Bug label Dec 21, 2016
@srivatsn srivatsn added this to the 1.0 RTM milestone Dec 21, 2016
@onovotny

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.

@dsplaisted
Member

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.

@nguerrera
Member

@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.

@dsplaisted
Member

@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)

@ericstj
Member
ericstj commented Jan 7, 2017

+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?

@srivatsn srivatsn modified the milestone: 1.0 RC3, 1.0 RTM Jan 7, 2017
@srivatsn srivatsn assigned dsplaisted and unassigned nguerrera Jan 11, 2017
@srivatsn srivatsn modified the milestone: 1.0 RC3, 1.0 RTM Jan 13, 2017
@dsplaisted dsplaisted assigned nguerrera and unassigned dsplaisted Jan 13, 2017
@srivatsn srivatsn modified the milestone: 1.1, 1.0 RTM Jan 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment