大网数据广告活动
Web服务器与PHP

Fix Visual Studio Setup Issues Due to Missing Certificate

· 52CE 我爱测

Resolve Visual Studio installation errors caused by missing certificates. Learn how to fix online and offline setup issues for Visual Studio 2017 and later.

Applies to: Visual Studio 2017 and later versions

When you try to install Microsoft Visual Studio 2017 or a later version, the installation wizard unexpectedly closes or indicates that it can't download some installation files. A missing certificate required for the Visual Studio install can cause this problem. This article provides guidance for resolving the missing certificate problem and enables you to successfully install Visual Studio.

Symptoms

The symptoms of this problem depend on whether you're trying an online installation or an offline installation.

Online installation

When you try an online installation of Visual Studio 2017 or a later version, the installation wizard displays the following message:

Before you get started, we need to set up a few things so that you can configure your installation.

After you select Continue in the message dialog box, the installation wizard closes and the installation stops.

Offline installation

When you try an offline installation of Visual Studio 2017 or a later version on a device that has limited or no internet access, the installation wizard displays the following error message:

Unable to download installation files. Check your internet connection and try again.

If your device has event logging enabled for the CryptoAPI (CAPI2), you also see the following error message in the CAPI2 Event Viewer logs (Event ID 30):

<Event>
  <UserData>
    <CertVerifyCertificateChainPolicy>
      <Policy type="CERT_CHAIN_POLICY_BASE" constant="1" />
      <Certificate fileRef="8D68C42C0E1487E33AFCD85B764E514AFC2F8772.cer" subjectName="Microsoft Corporation" />
      <CertificateChain chainRef="{6B598FF8-1F8F-429E-AE87-001A5FE49268}" />
      <Flags value="1" CERT_CHAIN_POLICY_IGNORE_NOT_TIME_VALID_FLAG="true" />
      <Status chainIndex="0" elementIndex="-1" />
      <EventAuxInfo ProcessName="vs_setup_bootstrapper.exe" />
      <CorrelationAuxInfo TaskId="{3553E2D5-941F-428B-904E-ADEC5F1F20A7}" SeqNumber="1" />
      <Result value="800B010A">
        A certificate chain could not be built to a trusted root authority.
      </Result>
    </CertVerifyCertificateChainPolicy>
  </UserData>
</Event>

To access the CAPI2 event logs from the Event Viewer, go to Applications and Services Logs > Microsoft > Windows > CAPI2 > Operational.

Enable CAPI2 logs

To enable CAPI2 event logging, follow these steps:

  1. Open Event Viewer by pressing <kbd>Win</kbd> + <kbd>R</kbd>, type eventvwr, and then press <kbd>Enter</kdb>.

  2. Navigate to Applications and Services Logs > Microsoft > Windows > CAPI2 > Operational.

  3. To delete any previous logs, right-click Operational, and then select Clear Log.

  4. To start logging, right-click Operational, and then select Enable Log.

    :::image type="content" source="./media/install-failure-2017-later-versions/event-viewer-enable-capi2-logs.png" alt-text="Event Viewer showing the right-click menu to clear or enable logs for CAPI2.":::

  5. Try again to install Visual Studio by using the offline installer.

  6. After you reproduce the problem, the CAPI2 event logs should contain details about the installation failure.

  7. To stop logging, right-click Operation, and then select Disable Log.

Cause

This problem can occur for one of the following reasons, depending on the type of installation:

Solution

To resolve this problem, follow these steps:

  1. Download the Microsoft Windows Code Signing PCA 2024 certificate by using a device that has internet access.

  2. Copy the certificate file to C:\Temp on the device that experiences the installation problem.

  3. Install the Microsoft Windows Code Signing PCA 2024 certificate in the Trusted Root Certification Authorities store. You can install the certificate by using either the Certificate Import Wizard or command line:

    • To install using the command line, run the following command in an elevated Command Prompt window:

      CertUtil -addStore CA "C:\Temp\Microsoft Windows Code Signing PCA 2024.crt"
      
    • To install using the Certificate Import Wizard:

      1. Right-click the certificate file and select Install Certificate.

      2. In the Certificate Import Wizard, choose Local Machine and select Next.

      3. Select Place all certificates in the following store.

      4. Select Browse... and choose Trusted Root Certification Authorities.

      5. Select Next, then select Finish to install the certificate.

  4. Try again to install Visual Studio by using the offline installer.

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
See source applicability · Source date 12/30/2025
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。