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

Instructions on how to install nuget provider in powershell #16

Open
DiegoSSJ opened this issue Aug 7, 2017 · 0 comments
Open

Instructions on how to install nuget provider in powershell #16

DiegoSSJ opened this issue Aug 7, 2017 · 0 comments

Comments

@DiegoSSJ
Copy link

DiegoSSJ commented Aug 7, 2017

When running the gulp task from a newly installed windows machine, it will complain that the nuget provider is not installed and apparently install it. But it doesn't really work. It looks like this:

[12:24:52] Starting 'install-packages'...
[12:24:52] Builder: Installing packages
Powershell - running: C:\websites\LiuSitecore\node_modules@pentia\sitecore-package-manager\powershell-scripts\Install-packages.ps1 -packagesFileLocation 'C:\website
s\LiU.local\Website\data
Getting Sitecore.Full Package

The provider 'nuget v2.8.5.208' is not installed.
nuget may be manually downloaded from https://oneget.org/Microsoft.PackageManagement.NuGetProvider-2.8.5.208.dll and installed.
Would you like PackageManagement to automatically download and install 'nuget' now?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Error: Get-Package : Unable to find package providers (NuGet).
At C:\websites\LiuSitecore\node_modules@pentia\sitecore-package-manager\powershell-scripts\install-package.ps1:16 char:21

Error: + ... $nugetPackage = Get-Package -ProviderName NuGet -AllVersions | Where ...

  •                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidArgument: (Microsoft.Power...lets.GetPackage:GetPackage) [Get-Package], Exception
    • FullyQualifiedErrorId : >UnknownProviders,Microsoft.PowerShell.PackageManagement.Cmdlets.GetPackage

One needs to run
Register-PackageSource -Name "NuGet" -Location https://api.nuget.org/v3/index.json -ProviderName "NuGet"

To get the same question and make it work. Then one can remove the additionally added "NuGet" source and run the task again and it works.

This could be stated in the documentation as a help for new users.

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

No branches or pull requests

1 participant