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

Migration: ProjectReference does not get the correct version for dotnet pack #7165

Closed
jgoshi opened this issue Nov 15, 2016 · 1 comment
Closed

Comments

@jgoshi
Copy link
Contributor

jgoshi commented Nov 15, 2016

The project.json file for Microsoft.DotNet.Cli.Utils contains a version number like this:
"version": "1.0.0-preview4-*"

The it is referenced in project dotnet-dependency-tool-invoker like this:
"dependencies": {
"Microsoft.DotNet.Cli.Utils": {
"target": "project"
}
}

After running dotnet pack, examining the nuspec file you see this snippet
nuspec:
<dependencies>
<group targetFramework=".NETCoreApp1.0">
<dependency id="Microsoft.DotNet.Cli.Utils" version="[1.0.0-preview4-004081, )" />
</group>
</dependencies>

After migrating to csproj, when running dotnet pack you get this:
<dependencies>
<group targetFramework=".NETCoreApp1.0">
<dependency id="Microsoft.DotNet.Cli.Utils" version="1.0.0" exclude="Build,Analyzers" />
</group>
</dependencies>

Note that we get the wrong version number for Microsoft.DotNet.Cli.Utils. In dotnet-dependency-tool-invoker.csproj if I change the reference to Microsoft.DotNet.Cli.Utils to a PackageReference instead of a ProjectReference things work. But that seems like a bug.

@jgoshi
Copy link
Contributor Author

jgoshi commented Nov 15, 2016

Closing this bug because we are tracking this one instead:
NuGet/Home#3953

@jgoshi jgoshi closed this as completed Nov 15, 2016
@msftgits msftgits transferred this issue from dotnet/cli Jan 31, 2020
@msftgits msftgits added this to the 1.0.0-preview4 milestone Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants