microsoft / vssetup.powershell

PowerShell module to interact with Visual Studio Setup
MIT License
233 stars 41 forks source link

The setup configuration provider registration fix #48

Closed alexfdezsauco closed 6 years ago

alexfdezsauco commented 6 years ago

I'm looking for a fix of visual studio registration or 'Microsoft Setup Configuration query API' registration (COM?). I know this is not a vssetup.powershell issue, but could be fixed by ' vssetup.powershell.

I noticed the symptom when I tried to install ReSharper on the VS2017 - 15.7 but the installer showed the following warning message:

Installer could not access the Microsoft Setup Configuration query API

So, I also run Get-VSSetupInstance (from this module) and get this error:

WARNING: The setup configuration provider is not registered. Assuming no registered instances.

Could be possible add a Cmd-Let to fix the registration?

I also run a clean up with:

%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\resources\app\layout\InstallCleanup.exe -i

and installed the VS again, but doesn't work.

heaths commented 6 years ago

Cleaning up the VS instance was not necessary. Run repair on VS. Often in these cases, the MSI that installs the system-wide configuration API is installed and detected as such, but the registration got removed somehow. Repairing repairs all packages regardless of state.

A faster way is to use my MSI PowerShell module:

Install-Module -Scope CurrentUser MSI
Get-MSIRelatedProductInfo '{1571205C-BAD1-4237-BFE6-B77E622C51DB}' | Repair-MSIProduct
alexfdezsauco commented 6 years ago

Thanks,

When I run your suggestion I got this error:

Repair-MSIProduct : An installation package for the product Microsoft Visual Studio Setup Configuration cannot be found. Try the installation again using a valid copy of the installation package 'Microsoft.VisualStudio.Setup.Configuration.msi'....

this lead me to search into the installed packages and open this file c:\ProgramData\Microsoft\VisualStudio\Packages\Microsoft.VisualStudio.Setup.Configuration,version=1.16.1163.30317_package.json and download and install this https://download.visualstudio.microsoft.com/download/pr/12046354/d68d54e233c956ff79799fdf63753c54/Microsoft.VisualStudio.Setup.Configuration.msi

and now is fixed