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

Correctly communicate PackageSpec.Version for any project dependencies (PackageRef xplat) #3901

Closed
emgarten opened this issue Nov 8, 2016 · 1 comment

Comments

@emgarten
Copy link
Member

emgarten commented Nov 8, 2016

The CPS project system should set the PackageSpec version for a project based on:

  1. PackageVersion if it exists
  2. Version if it exists
  3. 1.0.0 otherwise

This matches the pack and NuGet.targets behavior for determining a package version.

The version string must be valid, otherwise this should fail with a helpful error.

Original issue:
#3748

@emgarten emgarten added this to the 4.0 RC2 milestone Nov 8, 2016
@rrelyea rrelyea modified the milestones: 4.0 RC2, 4.0 RC3 Nov 29, 2016
@rrelyea rrelyea modified the milestones: 4.0 RTM, 4.0 RC3 Jan 4, 2017
@rrelyea rrelyea changed the title Set PackageSpec.Version for CPS projects Correctly communicate PackageSpec.Version for any project dependencies (PackageRef xplat) Jan 9, 2017
@rrelyea rrelyea modified the milestones: 4.0 RTM, 4.0 RC3 Jan 11, 2017
@rrelyea
Copy link
Contributor

rrelyea commented Jan 11, 2017

Requires this and dotnet/project-system#1132 to fix.

alpaix added a commit to alpaix/NuGet.Client that referenced this issue Jan 25, 2017
Resolves NuGet/Home#3901.

Acquire package version property for a .NET Core project from the
`IVsProjectRestoreInfo` as provided via the Nominate API call.

Although the `$(PackageVersion)` property shouldn't differ between
different TFMs current API design assumes all project properties will be
evaluated per each TFM.

As a result `SolutionRestoreService` expects to get the
same value of package version defined in each TFM property bag.
Otherwise `InvalidOperationException` will be thrown.
alpaix added a commit to alpaix/NuGet.Client that referenced this issue Jan 25, 2017
Resolves NuGet/Home#3901.

Acquire package version property for a .NET Core project from the
`IVsProjectRestoreInfo` as provided via the Nominate API call.

Although the `$(PackageVersion)` property shouldn't differ between
different TFMs current API design assumes all project properties will be
evaluated per each TFM.

As a result `SolutionRestoreService` expects to get the
same value of package version defined in each TFM property bag.
Otherwise `InvalidOperationException` will be thrown.
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

4 participants