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

Comments

Projects
None yet
4 participants
@ericstj

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

This comment has been minimized.

Show comment
Hide comment
@rrelyea

rrelyea Jun 2, 2016

Contributor

Are you using 3.5-beta of vsix?

Contributor

rrelyea commented Jun 2, 2016

Are you using 3.5-beta of vsix?

@ericstj

This comment has been minimized.

Show comment
Hide comment
@ericstj

ericstj Jun 2, 2016

No, was using 3.4.3.

ericstj commented Jun 2, 2016

No, was using 3.4.3.

@rrelyea

This comment has been minimized.

Show comment
Hide comment
@rrelyea

rrelyea Jun 3, 2016

Contributor

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

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

This comment has been minimized.

Show comment
Hide comment
@vancem

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

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 rrelyea added the Type:Bug label Jun 3, 2016

@rrelyea

This comment has been minimized.

Show comment
Hide comment
@rrelyea

rrelyea Jun 3, 2016

Contributor

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

Contributor

rrelyea commented Jun 3, 2016

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

@zhili1208

This comment has been minimized.

Show comment
Hide comment
@zhili1208

zhili1208 Jun 3, 2016

Contributor

Yes, it repros with 3.5-beta

Contributor

zhili1208 commented Jun 3, 2016

Yes, it repros with 3.5-beta

@rrelyea

This comment has been minimized.

Show comment
Hide comment
@rrelyea

rrelyea Jun 6, 2016

Contributor

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

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 Jun 6, 2016

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