0

I have downloaded an application for a tutorial i'm following. Opened it in Visual Studio 2017 CE + all updates as of today.

One of the dependency is AutoMoq (v 1.6.2)
Another dependency is NUnit (v 3.0.1)

There are other dependencies but i guess i can follow the same solution if the above gets working.

I looked at http://blog.davidebbo.com/2014/01/the-right-way-to-restore-nuget-packages.html and tried both the "old" and "new" way but either i didnt have the options or it didnt work.

When i manage Nuget projects i have several packages with "Not available in this source" The only option i have is Uninstall.

I can see a bar asking me to click Restore which i do and same problem.

The error list shows

NuGet Package restore failed for project Service: Unable to find version '3.0.1' of package 'NUnit'. C:\Program Files (x86)\Microsoft SDKs\NuGetPackages: Package 'NUnit.3.0.1' is not found on source 'C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\'. . Please see Error List window for detailed warnings and errors.

Looking at the path above i don't know if i need to install some SDK to get this working or if im missing a simple step? The tutorial doesn't state to install any SDK however the size of SDKs can be huge so if this is required then im not sure which SDK i need?

Edit: installing it manually with Install-Package AutoMoq -Version 1.6.2 Install-Package :

Some NuGet packages are missing from the solution. The packages need to be restored in order to build the dependency graph. Restore the packages before 
performing any operations.
At line:1 char:1
+ Install-Package AutoMoq -Version 1.6.2
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Install-Package], InvalidOperationException
    + FullyQualifiedErrorId : NuGetMissingPackages,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
Computer
  • 2,149
  • 7
  • 34
  • 71

1 Answers1

2

Ok so i dug a little deeper and not sure if this would help anyone in future but to overcome this problem, in Visual Studio I clicked Tools > Options and looked for Nuget Package Manager. Under Package Sources i added a new entry

Name: Nuget
Source: https://www.nuget.org/api/v2/

Clicked update. Exit.

Clicked Restore and everything came to life.

Computer
  • 2,149
  • 7
  • 34
  • 71