Skip to content

Can't apply a NuGet package to a blank solution in VS 2015 #1076

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

Closed
Konamiman opened this issue Jul 30, 2015 · 8 comments
Closed

Can't apply a NuGet package to a blank solution in VS 2015 #1076

Konamiman opened this issue Jul 30, 2015 · 8 comments

Comments

@Konamiman
Copy link

When I try to apply a NuGet package to a blank solution (the package creates a group of related projects in the solution) in Visual Studio 2015 I get the following error:

install-package : Project 'Default' is not found.
At line:1 char:1
+ install-package (The package name)
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Default:String) [Install-Package], ItemNotFoundException
    + FullyQualifiedErrorId : NuGetProjectNotFound,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

This was working fine in Visual Studio 2013.

@yishaigalatzer
Copy link

Solution level packages are deprecated in Visual Studio 2015. You can apply a package to a project and a simple way to achieve it is to create a project that will include what you used to apply to the solution level.

@yishaigalatzer
Copy link

@Konamiman
Copy link
Author

Too bad. Why removing a feature that is useful and doesn't harm? :-(

At my company we often create solutions with a predefined layer structure (interface, domain, infrastructure, tests) and we have a NuGet package that creates one project for each of these layers with the appropriate name and namespace depending on the solution name, plus adds a set of build scripts. With this change we will have to trash this, I can't see how we can use the "apply the same to a project" approach.

So we'll have to keep VS 2013 installed forever, just to apply this package to new solutions. That's crazy!

@yishaigalatzer
Copy link

Nuget was never intended to be a visual studio scripter. What you could do instead is build a vsix.

@prakhar241
Copy link

Even applying package at project level not working -

PM> Install-Package xunit.runner.utility -Version 2.1.0
Install-Package : Project 'Default' is not found.
At line:1 char:1

Install-Package xunit.runner.utility -Version 2.1.0

CategoryInfo : ObjectNotFound: (Default:String) [Install-Package], ItemNotFoundException
FullyQualifiedErrorId : NuGetProjectNotFound,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
PM>

@yishaigalatzer
Copy link

That looks like an unrelated issue, please open a new bug and provide exact details on how to reproduce the issue. Please make sure you are using the latest nuget extension (3.4.4-rc at the moment)

@prakhar241
Copy link

I got it fixed now after following 'bitpen' 4 steps listed here - http://stackoverflow.com/questions/10130333/cant-install-packages-with-nuget-500-internal-server-error

@sindamnataraj
Copy link

Easiest way to fix this is to open a working vs2015 solution(create a new one if you don't have one) and try the Install-Package command again.

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

4 participants