question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ShardManagement.psm1 can't download Client package from NuGet

See original GitHub issue

Hi, I downloaded the latest scripts from TechNet and ran this command:

>PS C:\Users\ab\Downloads> .\GetShards.ps1 -UserName x -Password y -ShardMapManagerServerName z -ShardMapManagerDatabaseName a -ShardMapName b

But recieved an error:

C:\Users\ab\Downloads\ShardManagement\Microsoft.Azure.SqlDatabase.ElasticScale.Client.dll was not found.
Would you like to download it from NuGet?
[Y] Yes  [N] No  [?] Help (default is "N"): y
Unable to find package 'Microsoft.Azure.SqlDatabase.ElasticScale.Client'.
copy : Cannot find path 'C:\Users\ab\Downloads\ShardManagement\Microsoft.Azure.SqlDatabase.ElasticScale.Client\lib
\net45\Microsoft.Azure.SqlDatabase.ElasticScale.Client.dll' because it does not exist.
At C:\Users\ab\Downloads\ShardManagement\ShardManagement.psm1:57 char:21
+             $null = copy "$ScriptDir\$edclPackage\lib\net45\$edclFile" $edclPath
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\alexba...cale.Client.dll:String) [Copy-Item], ItemNotFoundExce
   ption
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.CopyItemCommand

Searching for $edclPackage or $edclFile yielded no results other than this repo.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
belablotskicommented, Apr 5, 2019

It’s easy to fix by adding

Unregister-PackageSource -Name "nuget.org"
Register-PackageSource -Name "nuget.org" -Location "https://www.nuget.org/api/v2/" -ProviderName nuget

in the Common\AzureShardManagement.psm1 before $package = Find-Package -Name $edclPackage -ProviderName nuget -Source nuget.org

1reaction
jaredmoocommented, Aug 7, 2018

This is in my config: <add key="https://www.nuget.org/api/v2/" value="https://www.nuget.org/api/v2/" />

Read more comments on GitHub >

github_iconTop Results From Across the Web

When PowerShellGet v1 fails to install the NuGet Provider
The underlying issue here is that the remote endpoint used to bootstrap the provider requires TLS 1.2 and the client may not have...
Read more >
unable to download nuget packages Microsoft.data.sqlclient
I am creating a new project (windows forms- VB) in VS 2019. When I try to add nuget package with Nuget Package Manager...
Read more >
PowerShell Installing NuGet, says unable to access ...
I retried the Install-PackageProvider command with -verbose... the first time the message indicated it retried 3 times and cannot download the ...
Read more >
Why is my NuGet client failing to download packages?
If you fail to download (cache) from nuget remote repository (e.g. nuget gallery), check the request.log to see if a request for the...
Read more >
What to Do When You Can't See or Download NuGet ...
What to Do When You Can't See or Download NuGet Packages ... In this case, you don't need to configure anything on the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found