Cannot install Microsoft Visual Studio 2017 Installer Projects due to invalid certificate - visual-studio

I've been trying to install the Microsoft Visual Studio 2017 Installer Projects for VS 2017 Professional for some time now without success. First, I tried through the Extensions and Updates wizard within VS2017. It downloads correctly, but when I close VS to kick off the install if fails immediately with the following:
I then grabbed the VSIX from the Visual Studio Marketplace and tried to install it via the following command line:
VSIXInstaller InstallerProjects.vsix
This seemed to get me further, but also clued me into the certificates being the issue. Not how it says Digital Signature: Invalid Certificate:
After clicking through to continue the install, it fails and allows me to see the logs:
The logs seem to echo the certificate issue here:
10/17/2017 1:11:21 PM - Signature Details...
10/17/2017 1:11:21 PM - Extension is signed with an invalid certificate
10/17/2017 1:11:21 PM - (PartialChain) : A certificate chain could not be built to a trusted root authority.
10/17/2017 1:11:21 PM - (RevocationStatusUnknown): The revocation function was unable to check revocation for the certificate.
10/17/2017 1:11:21 PM - (OfflineRevocation) : The revocation function was unable to check revocation because the revocation server was offline.
And here:
10/17/2017 1:15:30 PM - Certificate is invalid: InstallerProjects.vsix
10/17/2017 1:15:36 PM - Skipping Install of 'VSInstallerProjects,version=0.8.4' since downloading it failed.
10/17/2017 1:15:36 PM - Skipping cache of package 'VSInstallerProjects,version=0.8.4' since the package or a parent package had a vital failure.
10/17/2017 1:15:36 PM - Skipping cache of package 'Component.VSInstallerProjects,version=0.8.4' since the package or a parent package had a vital failure.
10/17/2017 1:15:47 PM - Install Error : Microsoft.VisualStudio.Setup.PackageFailureException: Package 'VSInstallerProjects' failed to download
at Microsoft.VisualStudio.Setup.InstallOperation.Run(CancellationToken token)
at Microsoft.VisualStudio.Setup.Engine.RunOperation(InstallOperation installOperation, CancellationToken token, ExecuteAction action, ITelemetryOperation telemetryOperation)
at Microsoft.VisualStudio.Setup.Engine.RunCoreOperation(InstallOperation coreOperation, ExecuteAction action, ITelemetryOperation telemetryOperation, CancellationToken token)
at Microsoft.VisualStudio.Setup.Engine.Install(Product product, String destination, CancellationToken token)
at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.PerformSetupEngineInstall(InstallableExtensionImpl extension, Boolean installPerMachine, Boolean isPackComponent, IDictionary`2 extensionsInstalledSoFar, List`1 extensionsUninstalledSoFar, IInstalledExtensionList modifiedInstalledExtensionsList, IProgress`1 progress, InstallFlags installFlags, AsyncOperation asyncOp, Version targetedVsVersion, IInstalledExtension& newExtension)
at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.InstallInternal(InstallableExtensionImpl extension, InstallFlags installFlags, IDictionary`2 extensionsInstalledSoFar, List`1 extensionsUninstalledSoFar, IInstalledExtensionList modifiedInstalledExtensionsList, AsyncOperation asyncOp, IProgress`1 progress, Version targetedVsVersion)
at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.BeginInstall(IInstallableExtension installableExtension, InstallFlags installFlags, AsyncOperation asyncOp, Version targetedVsVersion)
at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.InstallWorker(IInstallableExtension extension, InstallFlags installFlags, AsyncOperation asyncOp)
Any thoughts on what could be happening?

...because the revocation server was offline
It is not offline, it couldn't be contacted. Before a certificate can be trusted, the installer must first contact the CRL server. It is maintained by the certificate authority, one of the services you pay for when you buy a certificate yourself. The Certificate Revocation List server keeps a list of certificates that turned out to be bogus. That is not happening, a pretty serious problem that long-term can compromise the security of the machine. And fatal when first contacted, the VSIX installer appropriately fails the install.
A TechNet article with troubleshooting hints is here. Do make this a problem for IT staff, they need to know that they are maintaining insecure machines. And are probably responsible for this issue in the first place.

After a lot of effort to resolve this,
we installed this package on an internet-connected computer to see what gets installed.
anyways, please follow the article
https://learn.microsoft.com/en-us/visualstudio/install/install-certificates-for-visual-studio-offline
to install the needed certificates.
after doing so, we realized that one more certificate is missing !
Microsoft Code Signing PCA 2010
after installing everything, export the certificates and install them on the offline computer.
this solution worked out for us.

In windows 10 I believe there is app settings that dictate whether or not you can install apps that are signed by an unknown signature, etc. Have you checked to make sure that these aren't locked down to only allow installs from the Microsoft App Store?
I think this applies:
https://technet.microsoft.com/en-us/library/ee619754%28v=ws.10%29.aspx
I have also seen issues where I have old certificate chains stuck on a specific AD user and was able to resolve them by clearing some of the certs and trying again.
I would also try installing it with any antivirus disabled etc.
This thread seems relevant, I would not use the first suggestion of disabling CRLF revcheck without trying some of the later comments first.
https://social.technet.microsoft.com/Forums/windowsserver/en-US/348a9b8d-8583-488c-9a96-42b892c4ae77/revocation-server-offline?forum=winserversecurity

For problems with Certificate validation for Visual Studio, it is possible that certificates has gone stale.
Here is how you can synchronize your certificates with Windows 10 using Windows Update and certutil. The commands are to be run with Powershell.
mkdir c:\certs #temporary folder where the certificates will be installed/updated
cd c:\certs
certutil.exe -generateSSTFromWU roots.sst
$sstStore = ( Get-ChildItem -Path C:\certs\roots.sst )
$sstStore | Import-Certificate -CertStoreLocation Cert:\LocalMachine\Root
I got a crash installing Votive (Windows Installer XML / Wix Visual Studio Extension) because of certificate did not validate on my computer. The reason was one certificate had gone stale (out of date). The SST file can be opened in MMC if you want to install just a single certificate for example.

Related

Vs2019 vsix is not installed

Here, I have attached my error log.
1/30/2019 5:09:42 PM - Microsoft.VisualStudio.ExtensionManager.CorruptInstanceException: VSIX Installer has encountered a problem. To troubleshoot, follow the steps here: https://aka.ms/pc5ifb ---> Microsoft.VisualStudio.Setup.Dependencies.DependencyGraphConstructionException: The dependent package of 'Microsoft.VisualStudio.Product.Professional,version=15.9.28307.222' cannot be found: Component.8B84B9F8-7BCA-41C4-9235-EA560AA96519,version=16.4.0.49.
at Microsoft.VisualStudio.Setup.Engine.Initialize()
at Microsoft.VisualStudio.Setup.Engine.GetProducts()
at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.IntializePackages()
at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.GetPrerequisitesInternal(IInstallableExtension extension, ICollection`1 installedPackages, ICollection`1 installablePackages, ICollection`1 unresolvedReferences)
at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.GetPrerequisites(IInstallableExtension extension, IEnumerable`1& installedPackages, IEnumerable`1& installablePackages, IEnumerable`1& unresolvedReferences)
at VSIXInstaller.ExtensionService.GetInstallableData(String vsixPath, String extensionPackParentName, Boolean isRepairSupported, IStateData stateData, IEnumerable`1& skuData)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
--- End of inner exception stack trace ---
at VSIXInstaller.ExtensionService.GetInstallableData(String vsixPath, String extensionPackParentName, Boolean isRepairSupported, IStateData stateData, IEnumerable`1& skuData)
at VSIXInstaller.ExtensionPackService.IsExtensionPack(IStateData stateData, Boolean isRepairSupported)
at VSIXInstaller.ExtensionPackService.ExpandExtensionPackToInstall(IStateData stateData, Boolean isRepairSupported)
at VSIXInstaller.App.Initialize(Boolean isRepairSupported)
at VSIXInstaller.App.Initialize()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
I've run into a very similar issue.
Here is the log message:
Error Log Message
After hours of searching the internet, I finally was able to find the solution.
I wanted to post it here and give clear step-by-step instructions on what I did so that other people won't have to go digging around the internet as I did.
TL;DR: This is a solution for Windows computers only.
First, if you can, you should try to uninstall the extension first. To do that, go to the directory where VSIXInstaller.exe is installed
(should be located where default Visual Studio is installed; e.g. C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\VSIXInstaller.exe).
Then open a PowerShell window as an Administrator in the installation directory. You can also open PowerShell as an Administrator and direct yourself to that directory by using the cd command.
Then enter this command to uninstall forcefully: .\VSIXInstaller.exe /a /f /u:<GUID_OF_EXTENSION> (in your case, that would be .\VSIXInstaller.exe /a /f /u:8B84B9F8-7BCA-41C4-9235-EA560AA96519). Note that this may fail due to this dependency failure.
If that worked, then good, you can move on to the next step. If not, go to where the extensions are (C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Extensions) and use some search program like Agent Ransack to search this package ID (and make sure to search it by content) and find the extension package folder that contains this package ID (to find the extension's ID refer to this). Once you've found it, delete that package folder to uninstall the extension manually. If this doesn't delete the package as well, then refer to this previously answered StackOverflow question, as there are some extension packages that may be installed on the system and need to be deleted from the Programs and Features from the Control Panel (if you are using Windows, that is).
Since this extension package is considered a dependency, you must also go and delete this extension from devenv.isolation.ini, vsga.isolation.ini, and blend.isolation.ini (they are all located under C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE if you are working with Visual Studio 2019).
Finally, using a search program (again I would recommend using Agent Ransack), go to %PROGRAMDATA%\Microsoft\VisualStudio\Packages and search for this extension's package ID (or package name; usually available from the extension.vsixmanifest in the vsix package Example Package ID). The search results should show which package folder is declaring this extension as a dependency. Delete that folder.
Once the extension is fully uninstalled, then you must find state.json and state.packages.json and delete the JSON properties that contain this package ID (or package name) (this solution was from this answer).
Once all of the above steps are done, you should be able to reinstall this extension. In my case, this issue was blocking me from being able to repair, uninstall, or modify Visual Studio completely, and following these steps allowed me to update Visual Studio.
I've run into a very similar issue, too.
Thanks for D.K, your answer works for me.
After I've installed Visual Studio 2022 Preview (version 17.1.0 preview 1.0), I want to update Visual Studio 2019 from 16.11.5 to 16.11.6. But its failed, and it show the following error message:
"The dependent package of 'Microsoft.VisaulStudio.Product.Enterprise,version=16.11.31729.503' cannot be found: Component.Microsoft.ML.ModelBuilder,version=16.7.6.2150501."
Error Message from Visual Studio Installer
So, I follow the steps of D.K's answer.
In my case I should delete the package of "Component.Microsoft.ML.ModelBuilder" for all steps, and the command of PowerShell should change to '.\VSIXINstaller.exe /a /f /q /u:Component.Microsoft.ML.ModelBuilder' in step 3.

VSIX Installer - 'Microsoft Analysis Services Projects' fails to install

The latest Microsoft VS2017 VSIX installer cannot install SSAS project template (Microsoft Analysis Services Projects). I can replicate this issue consistently with the installer.
**Note: I already followed the instructions mentioned in similar questions on Stack Overflow including downloading the SSDT installer and running each mini-installer manually from C:\Temp**
I can replicate this issue consistently with the Microsoft offline SSDT installer as well as the SSAS project template installer from Nuget.
They both install the same component named 'Microsoft Analysis Services Projects'
This is the error:
The file 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Business Intelligence Semantic Model\1.0\Microsoft.AnalysisServices.AppLocal.Core.dll' already exists.
I have tried deleting all the files under:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Business Intelligence Semantic Model\1.0\
and rerun the installer. However, the installer creates the file and then a moment later fails to install because the file already exists....
I need to get an installer that works without tripping over itself ;) LOL
I'm using Visual Studio 2017 trying to install Analysis Services project templates.
Here is the log file from the failed installation:
11/27/2018 4:07:16 PM - System restore is not supported on this system
11/27/2018 4:07:16 PM - Failed to create system restore point: 0x80131524
11/27/2018 4:08:20 PM - Package '04a86fc2-dbd5-4222-848e-911638e487fe,version=2.2' failed to install. System.IO.IOException: The file 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Business Intelligence Semantic Model\1.0\Microsoft.AnalysisServices.AppLocal.Core.dll' already exists.
at Microsoft.VisualStudio.Setup.Installer.VsixInstaller.<InstallCoreInternal>g__install|27_1(PackagePart part, Boolean saveExtensionManifest, <>c__DisplayClass27_0& , <>c__DisplayClass27_1& , <>c__DisplayClass27_2& , <>c__DisplayClass27_3& , <>c__DisplayClass27_4& )
at Microsoft.VisualStudio.Setup.Installer.VsixInstaller.InstallCoreInternal(String localPath, String installDir, InstallablePackage pkg)
at Microsoft.VisualStudio.Setup.Installer.FileInstaller.<>c__DisplayClass7_0.<InstallCore>b__0()
at Microsoft.VisualStudio.Setup.Installer.FileInstaller.DoAction(Func`1 action)
at Microsoft.VisualStudio.Setup.Installer.FileInstaller.InstallCore(String localPath, String installDir, InstallablePackage pkg)
at Microsoft.VisualStudio.Setup.Installer.InstallerBase.InstallHelper(InstallData installData)
11/27/2018 4:08:20 PM - Skipping cache of package 'Component.04a86fc2-dbd5-4222-848e-911638e487fe,version=2.2' since the package or a parent package had a vital failure.
11/27/2018 4:08:52 PM - Install Error : Microsoft.VisualStudio.Setup.PackageFailureException: Package '04a86fc2-dbd5-4222-848e-911638e487fe' failed to install
at Microsoft.VisualStudio.Setup.InstallOperation.Run(CancellationToken token)
at Microsoft.VisualStudio.Setup.Engine.RunOperation(InstallOperation installOperation, CancellationToken token, ExecuteAction action, ITelemetryOperation telemetryOperation)
at Microsoft.VisualStudio.Setup.Engine.RunCoreOperation(InstallOperation coreOperation, ExecuteAction action, ITelemetryOperation telemetryOperation, CancellationToken token)
at Microsoft.VisualStudio.Setup.Engine.Install(Product product, String destination, CancellationToken token)
at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.PerformSetupEngineInstall(InstallableExtensionImpl extension, Boolean installPerMachine, Boolean isPackComponent, IDictionary`2 extensionsInstalledSoFar, List`1 extensionsUninstalledSoFar, IInstalledExtensionList modifiedInstalledExtensionsList, IProgress`1 progress, InstallFlags installFlags, AsyncOperation asyncOp, Version targetedVsVersion, IInstalledExtension& newExtension)
at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.InstallInternal(InstallableExtensionImpl extension, InstallFlags installFlags, IDictionary`2 extensionsInstalledSoFar, List`1 extensionsUninstalledSoFar, IInstalledExtensionList modifiedInstalledExtensionsList, AsyncOperation asyncOp, IProgress`1 progress, Version targetedVsVersion)
at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.BeginInstall(IInstallableExtension installableExtension, InstallFlags installFlags, AsyncOperation asyncOp, Version targetedVsVersion)
at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.InstallWorker(IInstallableExtension extension, InstallFlags installFlags, AsyncOperation asyncOp)
After uninstalling VS2017 and reinstalling it works fine. Hope this helps someone ;)

How to resume a Visual Studio 2017 intentionally stopped

I started downloading Visual Studio for offline installation using layout switch. When the installation was 19.1Go, I closed the console and the download got stopped. Today I restarted it in the same folder (where previous files were) thinking it would continue. However, from what I see, it simply overwrites the previous files (files are still downloaded from internet). So, I am wondering if someone has a way to make it continue.
Thank you.
simple retype the command after opening command prompt in my case it was vs_community.exe --layout c:\vs2017layout --lang en-US
NOTE directory should be same as previous
it first verify the previously downloaded packages and then resumed the downloading here are some logs
Verified existing package 'Microsoft.VisualC.140.CRT.Redist.X86.Msi,version=14.0.24225'
Verified existing package 'Microsoft.VisualC.140.CRT.Source.Msi,version=14.0.24225'
Verified existing package 'Microsoft.VisualC.140.CRT.x64.Desktop.Msi,version=14.0.24225'
Verified existing package 'Microsoft.VisualC.140.CRT.x64.OneCore.Desktop.Msi,version=14.0.24225'
Verified existing package 'Microsoft.VisualC.140.CRT.x64.Store.Msi,version=14.0.24225'
Verified existing package 'Microsoft.VisualStudio.OfficeDeveloperTools.WIF.WindowsFeature,version=15.0.26621.2'
Total packages to download: 307
Starting 'UpdateLayout' operation
Download of 'https://download.visualstudio.microsoft.com/download/pr/10661194/7385009d7cc46622284fa28aea9a82bf/netfx45_dtp.msi' succeeded using engine 'WebClient'
Download of 'https://download.visualstudio.microsoft.com/download/pr/10715705/f34cc4a1fd105b0276170faf7f5e0271/VC_CRT.X86.Desktop.msi' succeeded using engine 'WebClient'
Download of 'https://download.visualstudio.microsoft.com/download/pr/10715705/f34cc4a1fd105b0276170faf7f5e0271/cab2.cab' succeeded using engine 'WebClient'Download of 'https://download.visualstudio.microsoft.com/download/pr/10661194/7385009d7cc46622284fa28aea9a82bf/netfx45_dtp.cab' succeeded using engine 'Bits'
UpdateLayout progress: 0.06%
Download of 'https://download.visualstudio.microsoft.com/download/pr/10715069/2f1ac63ac0488abe845c76ad6690d8c9/VC_CRT.X86.OneCoreDesktop.msi' succeeded using engine 'Bits'
Download of 'https://download.visualstudio.microsoft.com/download/pr/10715705/f34cc4a1fd105b0276170faf7f5e0271/cab1.cab' succeeded using engine 'WebClient'
Yes , now we can resume the offline installation. Latest installer Verifies the files if directory is unchanged and Resumes from there But they should provide torrent links of at least VS community edition, it is more reliable especially if files are multiple and are large in size.

Visual Studio 2017 Enterprise offline installation stuck

I had to disconnect my laptop from the internet for some time (before disconnecting the offline installation was working just fine and had already downloaded 11.6GB). When I got back I ran the vs_enterprise.exe --layout C:\vs2017offline --lang en-US command again but now it gets stuck on
=> Layout operation correlation: {"id":"5c09fc12-236c-4c7e-9a8e-7d24500b9e1d"}
I checked my error log file and it is empty.
Below are my log files. I can't understand why this is happening, so any help will be appreciated.
=>[29e8:000f][2017-03-18T10:56:51] Download requested: https://go.microsoft.com/fwlink/?linkid=833502
=>[29e8:000c][2017-03-18T10:56:51] Download requested: https://go.microsoft.com/fwlink/?linkid=833501
=>[29e8:0012][2017-03-18T10:56:51] Attempting download 'https://go.microsoft.com/fwlink/?linkid=833502' using engine 'WebClient'
=>[29e8:0013][2017-03-18T10:56:51] Attempting download 'https://go.microsoft.com/fwlink/?linkid=833501' using engine 'WebClient'

Visual Studio 2015 Update 3 Installation/Change Fails - "The parameter is incorrect"

I am trying to install the Visual Studio 2015 Update 3, but I am receiving an error each time. I have tried both the web installer and the ISO, and I have also tried going into Control Panel/Programs and modifying the 2015 install. All of these result in the same error: "Setup Engine - The parameter is incorrect". I've read about some of the other issues with the installer, but I'm hoping somebody else might have seen this one or something similar. The logs always have the following error in them:
[1B10:1DA0][2016-07-18T11:39:28]e000: Error 0x80070057: Failed to convert version: to DWORD64 for ProductCode: {284FA9A0-CEDD-81D3-5A19-5858E95FD0C4}
[1B10:1DA0][2016-07-18T11:39:28]e151: Detect failed for package: Win10_Universal_CRT_SDK_Extension_SDK, error: 0x80070057
I have even tried to download the full installer for VS2015, but all installers seem to run through the same error. Any ideas on how I might repair this particular component so the installs will succeed?
Additional information, this is happening on a VM of Windows 10 running in Parallels 11.
Screen shot of installer failing
I found a similar issue hereļ¼š https://connect.microsoft.com/VisualStudio/feedback/details/974081/visual-studio-update-3-installation-keeps-failing-error-message-setup-engine-the-parameter-is-incorrect
The reply from Heath[MSFT]:
The logs confirm that some of your Windows Installer product
registration is corrupt. For the first issue, open a command prompt
(preferably elevated to avoid multiple UAC prompts later) and run the
following:
start /wait msiexec /fomus {284FA9A0-CEDD-81D3-5A19-5858E95FD0C4} REINSTALL=ALL
That should get
you past the first problem. If it does not, manually remove the
product like so and re-install it from the package cache:
start /wait msiexec /x {284FA9A0-CEDD-81D3-5A19-5858E95FD0C4} IGNOREDEPENDENCIES=ALL
start /wait msiexec /i "C:\ProgramData\Package Cache\{A79F6653-6AF1-4AF2-BC15-F5D6C05E1E6A}v2.0.40326.0\packages\sptoolsDependencies\enu\WorkflowManagerTools_x64.msi" ADDLOCAL=ALL NOVSUI=1
(change the above file
WorkflowManagerTools_x64.msi according to your log file record) After
this, installing VS Update 3 should work.
I had a very similar problem which at its root exhibited the same issue identified above in the Visual Studio 2015 Update 3 setup error (I couldn't install SSMS 17.1 which uses the Visual Studio 2015 Isolated Shell). I tried the solution above which unfortunately did not work for me. I did some more digging through the vs_isoshell.exe log file and found lines similar to those below.
[6BE0:36E0][2017-07-13T13:05:36]i000: Error 0x80070057: Failed to convert version: to DWORD64 for ProductCode: {9A7E3828-17FB-3E0C-9B28-48493E01937A}
The ProductCode refers to the "Microsoft Visual C++ 15 x86 Debug Runtime - 14.10.24269".
A perusal of my installed programs showed I did not have this installed, and I was unable to install it again due to a later version being present (it turns out it was upgraded, or removed, when I installed Visual Studio 2017).
I did some more searching and came across this page which had steps I adapted to my situation. I performed the same registry profiling of the installer with Process Monitor and the same key was missing. I added a key called DisplayVersion (string - REG_SZ) to the path below with a value of 14.10.24629 and that worked.
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\8283E7A9BF71C0E3B9828494E31039A7\InstallProperties]
Adding the key/value pair allowed the installation of the VS 2015 Update 3 Isolated Shell to finish successfully which in turn allowed the SSMS 17.1 installation to complete successfully.

Resources