Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a way to set the project restore type #4046

Closed
dsplaisted opened this issue Dec 1, 2016 · 2 comments
Closed

Provide a way to set the project restore type #4046

dsplaisted opened this issue Dec 1, 2016 · 2 comments

Comments

@dsplaisted
Copy link

NuGet.targets sets the _ProjectRestoreType property based on whether there is a project.json file in the project, whether the project has a PackageReference, and whether the project has a TargetFramework or TargetFrameworks property.

Projects using the .NET Sdk should always use the "NETCore" restore type. Right now, to do this, the .NET Sdk has to add a target that runs after _GetProjectRestoreType to set this property. It would be preferable for NuGet.targets to only set this property if it wasn't already set, so that the .NET Sdk could simply set this property in it's .props files.

@emgarten
Copy link
Member

emgarten commented Dec 6, 2016

This sounds related to: #3504

@dsplaisted I could do that check to avoid overriding, but should this be a property such as ProjectRestoreType without the underscore? It would be awesome if the SDK could just tell NuGet which mode to use, the current flow is just because that was not available.

@emgarten
Copy link
Member

@dsplaisted I've moved this property to RestoreProjectStyle, if set NuGet will respect the existing value. It would be great if the SDK could set this so NuGet could use that instead of trying to determine the project type itself.

<PropertyGroup>
   <RestoreProjectStyle>PackageReference</RestoreProjectStyle>
</PropertyGroup>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants