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

Solution-level packages, like xunit.runner.console, are not visible/restored in VS2015 #986

Closed
mattzink opened this issue Jul 22, 2015 · 8 comments
Labels
Priority:2 Issues for the current backlog. Resolution:Duplicate This issue appears to be a Duplicate of another issue

Comments

@mattzink
Copy link

We have some packages references at the solution-level (.nuget/packages.config), added using the VS2013 UI, that are no longer visible in the VS2015 Nuget extension UI and are also not being restored on build.

In fact, I don't even seen a way to add packages that are not associated to a particular project, such as xunit.runner.console. If I unselect all the projects, the install button is disabled.

@emgarten
Copy link
Member

Solution level packages are no longer supported in NuGet v3 #78

The simple fix for this is to install xunit.runner.console into one of the projects so that it will be added to the packages folder.

@mattzink
Copy link
Author

That's too bad. Many packages have to do with the solution build process, and it doesn't make sense to associate those to a particular project. Is there any write-up on the reasoning for this change? This also opens up the problem of different projects referring to different versions of the same package which isn't possible with solution-level packages.

@MicahZoltu
Copy link

Ugh. We are running into this problem as well. This deprecation should be published more visibly. My team just spent several hours scouring the web trying to figure out why our solution packages weren't being restored only to find that the feature was silently dropped.

What is the recommended migration story like? Should we just delete global package.config? What happens if the project is opened in VS2013 after making the package a project package?

@MicahZoltu
Copy link

I just tested building my project in VS2013 after moving the solution package to a project and deleting the packages.config. The result is that VS2013 will recreate the .nuget folder and packages.config with the solution level package added back to it.

I'm guessing that if I upgrade the package in VS2015, then I'll end up with a mismatched version of the package when building with VS2013 and VS2015.

@deepakaravindr
Copy link

@Zoltu,

You are right about the migration story.

  1. you can simply install the solution-level package(s) to a project or simply add the global packages.config to one of the project and delete out .nuget folder and the global packages.config
  2. Perform package restore and you are good to go

After migrating a project to only have project-level packages,

Opening the project in VS 2015,

  1. Package restore works fine. There are no issues
  2. Package updates will treat all packages as project-level packages and there should be no problem.
    You can perform all the installs, uninstalls and upgrades on VS 2015 and open it on VS 2013 and it will work

Opening the project in VS 2013,

  1. Package restore works fine here too. NuGet in VS 2013 will think that there are no solution-level packages for the opened solution, which is true. nuget.exe restore works too and so does the build
  2. Package updates will NOT work for legacy solution level packages. They will get uninstalled from the project it belongs to and but the newer version will get installed at the solution level. There are some (not so ideal) workarounds for this issue
  • If you performed updates on VS 2013, make sure to migrate the solution-level packages back to being project-level packages
  • Once migrated your solution to VS 2015, do not perform update or install from VS 2013

@mattzink , To answer your second point about solution-level packages. Yes, they do ensure that the same version is installed across the solution. But, that is a side-effect of being a solution level package. A similar concern has always been expressed about packages in general. That is what NuGet should try to fix. I think the new feature called 'Sync-Package' cmdlet in NuGet Powershell tries to fix that problem for you

@emgarten emgarten reopened this Aug 26, 2015
@emgarten
Copy link
Member

NuGet should support round tripping projects between 2013 and 2015.

@yishaigalatzer yishaigalatzer added this to the 3.3.0-Beta milestone Sep 21, 2015
@yishaigalatzer yishaigalatzer added the Priority:2 Issues for the current backlog. label Sep 21, 2015
@carlin-q-scott
Copy link

Are you guys sure that solution level packages aren't supported in NuGet 3.0? The linked issue specifically says "legacy solution level packages".

I also have this problem using NuGet 2.8 in VS2013 with a legacy solution level package but if I migrate the solution to using the new NuGet restore method introduced in 2.7 then the solution level package restores properly.

@yishaigalatzer
Copy link

What is not supported is that you cannot add/manage/update solution level packages in 3.0.

We plan to bring it back through #1521

Closing this issue, because 1521 has more details and design.

@yishaigalatzer yishaigalatzer added the Resolution:Duplicate This issue appears to be a Duplicate of another issue label Oct 26, 2015
@yishaigalatzer yishaigalatzer removed this from the 3.3.0-Beta milestone Oct 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:2 Issues for the current backlog. Resolution:Duplicate This issue appears to be a Duplicate of another issue
Projects
None yet
Development

No branches or pull requests

6 participants