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

NuGet update through package manager removes properties from the project.json #2888

Closed
ericstj opened this issue Jun 2, 2016 · 7 comments
Closed
Assignees
Labels
Resolution:External This issue appears to be External to nuget Type:Bug
Milestone

Comments

@ericstj
Copy link

ericstj commented Jun 2, 2016

@vancem noticed this when trying to upgrade a project.

This is happening for both "type": "platform" and "exclude": "compile". The latter is definitely bug and something that should be fixed. Package manager should preserve the dependency shape (properties vs not) in the project.json.

The former is a different question (NuGet from updating the shared framework) which I'll leave out of this issue. /cc @piotrpmsft

@rrelyea
Copy link
Contributor

rrelyea commented Jun 2, 2016

Are you using 3.5-beta of vsix?

@ericstj
Copy link
Author

ericstj commented Jun 2, 2016

No, was using 3.4.3.

@rrelyea
Copy link
Contributor

rrelyea commented Jun 3, 2016

@vancem / @ericstj - Can you please add repro steps and details?
Would be great to understand if 3.5-beta of the VSIX shows the same problem, too. That is the VSIX one should be using when doing netcore work.

@vancem
Copy link

vancem commented Jun 3, 2016

I happen to reproduce it from VS 2015 (update 2) To repo there

Create a new project

File -> New Project -> Visual C# -> .Windows -> .NET Core Console Application (.NET COre)

You get a new project with a project.json which has type property in dependencies

"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0-rc2-3002702"
}

Then I wanted to upgrade Microsoft.NETCore.App to the latest private drop. I did this by right cliking on the 'References' node in the solution, -> Manage Nuget Packages. I have made a feed for the myget repo (if you don't already have it)

https://dotnet.myget.org/F/dotnet-core/api/v3/index.json

and browsed to the Microsoft.NetCore.App package, and clicked the 'upgrade icon associated with that package.

Once I upgraded, if I looked at my project.json I get

"dependencies": {
"Microsoft.NETCore.App": "1.0.0-rc4-000376"
},

which did the upgrade but 'lost' the "type" : "platform" property, which basically broke my app in a way that I had to go get expert help (Eric) to figure out.

@rrelyea rrelyea added this to the 3.5 Beta2 milestone Jun 3, 2016
@rrelyea
Copy link
Contributor

rrelyea commented Jun 3, 2016

let's investigate with 3.5-beta2 - does it still repro? and investigate issue/fix.

@zhili1208
Copy link
Contributor

Yes, it repros with 3.5-beta

@rrelyea
Copy link
Contributor

rrelyea commented Jun 6, 2016

This appears to be a ASPNET Tooling issue. As noted by Zhi above, we've opened an issue on them.

@rrelyea rrelyea closed this as completed Jun 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution:External This issue appears to be External to nuget Type:Bug
Projects
None yet
Development

No branches or pull requests

4 participants