3 Replies - 302 Views - Last Post: 18 November 2018 - 02:32 PM

#1 SteveHi   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 58
  • Joined: 07-June 15

Problem installing NuGet packages - VS 2017

Posted 18 November 2018 - 03:04 AM

Hello

I am trying to install two NuGet packages using Visual Studio 2017:

Install-Package System.Web.Helpers.Crypto -Version 3.2.3 from here: NuGet

I have copied and pasted Install-Package System.Web.Helpers.Crypto -Version 3.2.3 into VS2017 Tools | NuGet Package Manager | Package Manager Console (Package Source: All) and get the following error:

Install-Package : Project 'Default' is not found.
At line:1 char:1
+ Install-Package System.Web.Helpers.Crypto -Version 3.2.3
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Default:String) [Install-Package], ItemNotFoundException
+ FullyQualifiedErrorId : NuGetProjectNotFound,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand


Then I tried to get: Install-Package WebHelpers -Version 4.0.2 from here: NuGet

Again, I copied and pasted Install-Package WebHelpers -Version 4.0.2 into VS2017 Tools | NuGet Package Manager |
Package Manager Console (Package Source: All) and get the following error:

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

What am I doing wrong, please?

Thank you.

Is This A Good Question/Topic? 0
  • +

Replies To: Problem installing NuGet packages - VS 2017

#2 andrewsw   User is online

  • quantum multiprover
  • member icon

Reputation: 6778
  • View blog
  • Posts: 27,971
  • Joined: 12-December 12

Re: Problem installing NuGet packages - VS 2017

Posted 18 November 2018 - 01:11 PM

I would update NuGet itself, probably first updating Visual Studio.

You may have to consider reinstalling VS itself but hopefully updating should suffice.
Was This Post Helpful? 0
  • +
  • -

#3 SteveHi   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 58
  • Joined: 07-June 15

Re: Problem installing NuGet packages - VS 2017

Posted 18 November 2018 - 02:07 PM

Thanks Andrewsw for your reply.

I have the latest version of VS (version 15.9.1). It was updated on 16th Nov. I *think* I have updated NuGet through the NuGet Package Console.
Was This Post Helpful? 0
  • +
  • -

#4 SteveHi   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 58
  • Joined: 07-June 15

Re: Problem installing NuGet packages - VS 2017

Posted 18 November 2018 - 02:32 PM

In the NuGet window, where the PM cursor is, I have typed in:

PM> Update-Package

This is what I get:

PM> Update-Package
Update-Package : Project 'Default' is not found.
At line:1 char:1
+ Update-Package
+ ~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Default:String) [Update-Package], ItemNotFoundException
+ FullyQualifiedErrorId : NuGetProjectNotFound,NuGet.PackageManagement.PowerShellCmdlets.UpdatePackageCommand

PM>

Thanks again.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1