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 restore project.csproj should error if the project isn't using nuget (p.config or p.json) #2766

Closed
rrelyea opened this Issue May 11, 2016 · 8 comments

Comments

Projects
None yet
3 participants
@rrelyea
Contributor

rrelyea commented May 11, 2016

#1496 just fixed this for "nuget update" w/ packages.config.
Let's me sure we have similar fix for restore as well.

And should we change the error if the project would be using project.json, instead of packages.config -- for both nuget restore and nuget update.

@rrelyea

This comment has been minimized.

Show comment
Hide comment
@rrelyea

rrelyea Jun 16, 2016

Contributor

We need this to be done on the project level, but not the solution level. Solutions are ok to call restore on, and not have any usages of NuGet.

If you restore|update a project, w/o p.j or p.c - we error then.
if you restore|update a solution w/o p.j or p.c, we shouldn't error or warn.

Contributor

rrelyea commented Jun 16, 2016

We need this to be done on the project level, but not the solution level. Solutions are ok to call restore on, and not have any usages of NuGet.

If you restore|update a project, w/o p.j or p.c - we error then.
if you restore|update a solution w/o p.j or p.c, we shouldn't error or warn.

@rrelyea

This comment has been minimized.

Show comment
Hide comment
@rrelyea

rrelyea Jun 16, 2016

Contributor

Customer feedback:
It has a major regression: it blows up on solutions that don’t use NuGet, when it used to no-op.

e.g. clone https://github.com/KuduApps/SimpleWebApplication and run nuget restore.

Beta 1 (and earlier):
MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x86)\MSBuild\14.0\bin'.

Beta 2:
MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x86)\MSBuild\14.0\bin'.
Unable to restore. The project does not contain a project.json or packages.config file.

Make sure you don’t ship that, and please add a test case to cover this scenario.

Contributor

rrelyea commented Jun 16, 2016

Customer feedback:
It has a major regression: it blows up on solutions that don’t use NuGet, when it used to no-op.

e.g. clone https://github.com/KuduApps/SimpleWebApplication and run nuget restore.

Beta 1 (and earlier):
MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x86)\MSBuild\14.0\bin'.

Beta 2:
MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x86)\MSBuild\14.0\bin'.
Unable to restore. The project does not contain a project.json or packages.config file.

Make sure you don’t ship that, and please add a test case to cover this scenario.

@rrelyea rrelyea added the Priority:0 label Jun 16, 2016

@rrelyea

This comment has been minimized.

Show comment
Hide comment
@rrelyea

rrelyea Jun 16, 2016

Contributor

Please add several tests...
solution with no projects
solution with 1 project, w/ no nuget
solution with 2 project, 1 w/ no nuget, other with p.j
solution with 2 project, 1 w/ no nuget, other with p.c

Contributor

rrelyea commented Jun 16, 2016

Please add several tests...
solution with no projects
solution with 1 project, w/ no nuget
solution with 2 project, 1 w/ no nuget, other with p.j
solution with 2 project, 1 w/ no nuget, other with p.c

@rrelyea rrelyea modified the milestones: 3.5 Beta2, 3.5 Beta3 Jun 16, 2016

@rrelyea

This comment has been minimized.

Show comment
Hide comment
@rrelyea

rrelyea Jun 16, 2016

Contributor

meant to make b2, not b3

Contributor

rrelyea commented Jun 16, 2016

meant to make b2, not b3

@TimBarham

This comment has been minimized.

Show comment
Hide comment
@TimBarham

TimBarham Jun 17, 2016

Member

Fix is in 3.5 beta2 and dev.

Member

TimBarham commented Jun 17, 2016

Fix is in 3.5 beta2 and dev.

@TimBarham TimBarham closed this Jun 17, 2016

@davidebbo

This comment has been minimized.

Show comment
Hide comment
@davidebbo

This comment has been minimized.

Show comment
Hide comment
@davidebbo

davidebbo Jun 17, 2016

Member

Build on there is 3.5.0.1484, which is the same as before the fix, so I'm guessing not. @rrelyea, let me know when it gets there and I'll test with it.

Member

davidebbo commented Jun 17, 2016

Build on there is 3.5.0.1484, which is the same as before the fix, so I'm guessing not. @rrelyea, let me know when it gets there and I'll test with it.

@rrelyea

This comment has been minimized.

Show comment
Hide comment
@rrelyea

rrelyea Jun 17, 2016

Contributor

Will do. ETA tomorrow morning.

Contributor

rrelyea commented Jun 17, 2016

Will do. ETA tomorrow morning.

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