OneGet / NuGetProvider

NuGet Provider for OneGet. Works on Nano Server.
MIT License
31 stars 24 forks source link

unable to install package Microsoft.Data.SqlClient #62

Closed MartinHBA closed 4 years ago

MartinHBA commented 4 years ago

Hello, I am unable to install nuget package with

 Install-Package  Microsoft.Data.SqlClient -Provider nuget -Force

It will result in error below:

PS C:\WINDOWS\system32> Install-Package Microsoft.Data.SqlClient -Provider nuget -Force
Install-Package : Dependency loop detected for package 'Microsoft.Data.SqlClient'.
At line:1 char:1
+ Install-Package Microsoft.Data.SqlClient -Provider nuget -Force
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : Deadlock detected: (Microsoft.Data.SqlClient:String) [Install-Package], Exception
    + FullyQualifiedErrorId : DependencyLoopDetected,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

only way to install this package is with skipdependencies parameter:

Install-Package Microsoft.Data.SqlClient -Provider nuget -skipdependencies

I am pretty sure there is no loop in dependency, Package Manager in visual studio C# project is able to load this nuget package without any issue

dafanasiev commented 4 years ago

I think that this is bug. See: https://github.com/dotnet/runtime/issues/31065

rbleattler commented 4 years ago

Has there been any movement here? This is still an issue.

MartinHBA commented 4 years ago

@rbleattler it's resolved by evolution. STEP 1: install Powershell 7 STEP 2: run Powershell 7 as administrator STEP 3: Install-Package Microsoft.Data.SqlClient DONE

potatoqualitee commented 3 years ago

Thanks for that solution, @MartinHBA !

ps-vishnu commented 3 years ago

@MartinHBA I have followed the steps but nothing is showing up after Install-Package Microsoft.Data.SqlClient image

Verayth commented 3 years ago

PS C:\windows\system32> pwsh PowerShell 7.1.4 Copyright (c) Microsoft Corporation.

https://aka.ms/powershell Type 'help' to get help.

PS C:\Windows\System32> Install-Package Microsoft.Data.SqlClient Install-Package: Dependency loop detected for package 'Microsoft.Data.SqlClient'. PS C:\Windows\System32>

potatoqualitee commented 3 years ago

@Verayth -- the command you're looking for is Install-Package Microsoft.Data.SqlClient -SkipDependencies