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

PackageManagement is broken in the latest alpha-12 on Linux #2664

Closed
jianyunt opened this issue Nov 11, 2016 · 5 comments
Closed

PackageManagement is broken in the latest alpha-12 on Linux #2664

jianyunt opened this issue Nov 11, 2016 · 5 comments
Labels
Resolution-Fixed The issue is fixed. WG-Engine core PowerShell engine, interpreter, and runtime

Comments

@jianyunt
Copy link
Contributor

A user reported in OneGet/oneget#239 that OneGet is broken in the Alpha12 on Linux.

Debugging into the issue, the following line seems causing the problem. Microsoft.Win32.Registry throws an exception now which is peace and safe before. Per Dongbo, it is caused by the latest CoreCLR change.

System.TypeInitializationException
"Operation is not supported on this platform."
"Microsoft.Win32.Registry"
" at Microsoft.Win32.RegistryKey.OpenBaseKeyCore(RegistryHive hKey, RegistryView view)\n at Microsoft.Win32.Registry..cctor()"

Source: https://github.com/OneGet/oneget/blob/master/src/Microsoft.PackageManagement/Implementation/PackageManagementService.cs

      internal void LoadProviders(IHostApi request) {var providerAssemblies = (_initialized ? Enumerable.Empty<string>() : _defaultProviders)
               .Concat(GetProvidersFromRegistry(Registry.LocalMachine, "SOFTWARE\\MICROSOFT\\PACKAGEMANAGEMENT"))
               .Concat(GetProvidersFromRegistry(Registry.CurrentUser, "SOFTWARE\\MICROSOFT\\PACKAGEMANAGEMENT"));

Steps to reproduce

Install the alpha12 on Linux
Get-PackageProvider

Expected behavior

PowerShellGet and NuGet providers should be listed from Get-PackageProvider

Actual behavior

Nothing returned. No assemblies are successfully initialized.

Environment data

PS /opt/microsoft> $PSVersionTable                                              

Name                           Value                                           
----                           -----                                           
PSVersion                      6.0.0-alpha                                     
PSEdition                      Core                                            
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                         
BuildVersion                   3.0.0.0                                         
GitCommitId                    v6.0.0-alpha.12                                 
CLRVersion                                                                     
WSManStackVersion              3.0                                             
PSRemotingProtocolVersion      2.3                                             
SerializationVersion           1.1.0.1                                         

@jianyunt
Copy link
Contributor Author

I am going to make PR soon

@joeyaiello joeyaiello changed the title PackageManagement is broken in the latest Alpah12 on Linux PackageManagement is broken in the latest alpha-12 on Linux Nov 11, 2016
@joeyaiello joeyaiello added the WG-Engine core PowerShell engine, interpreter, and runtime label Nov 11, 2016
@jmuelbert
Copy link

In Powershell for macOS is the same error

@mirichmo
Copy link
Member

mirichmo commented Nov 17, 2016

@jianyunt Is this issue resolved? if so, please close it, mark it fixed, and place it in the alpha.13 milestone. If you don't have permissions for that, let me know.

@jianyunt
Copy link
Contributor Author

@mirichmo yes, checked-in. Can you place it to alpha12 milestone. After that i can close it.

@mirichmo mirichmo added the Resolution-Fixed The issue is fixed. label Nov 17, 2016
@mirichmo mirichmo added this to the 6.0.0-alpha.13 milestone Nov 17, 2016
@mirichmo
Copy link
Member

I'm closing it since I am already modifying it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-Fixed The issue is fixed. WG-Engine core PowerShell engine, interpreter, and runtime
Projects
None yet
Development

No branches or pull requests

4 participants