Can't install MS Build Tools on Microsoft Windows 2019 Datacenter edition with Containers

DaveO 6 Reputation points
2021-07-04T04:39:18.527+00:00

I've launched a Microsoft Windows 2019 Datacenter edition with Containers VM and I'm trying to install ms build tools.

Installing the build is failing with "A product matching the following parameters cannot be found" after it tries to download 'https://go.microsoft.com/fwlink/?linkid=2066144', which redirects to XML news feed 'https://vsstartpage.blob.core.windows.net/news/vs'.

I download the msbuild tool installer using the latest link from here: https://learn.microsoft.com/en-us/visualstudio/releases/2019/history:
Invoke-WebRequest -UseBasicParsing https://download.visualstudio.microsoft.com/download/pr/12210059/e64d79b40219aea618ce2fe10ebd5f0d/vs_BuildTools.exe -OutFile vs_BuildTools.exe;

Then I run the installer:

`Start-Process vs_BuildTools.exe -ArgumentList '--add', 'Microsoft.VisualStudio.Workload.MSBuildTools', '--add', 'Microsoft.VisualStudio.Workload.VCTools', '--quiet', '--norestart', '--nocache' -NoNewWindow -Wait; ``

When I check the install log I get the download error below and package not found.

   [0c8c:000a][2021-07-04T04:32:26] Starting C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.windows.exe with arguments /finalizeinstall 6F320B93-EE3C-4  
   826-85E0-ADF79F8D4C61 "Visual Studio Installer" "Microsoft Visual Studio Installer" 2.11.13.53049 0 "C:\Program Files (x86)\Microsoft Visual Studio\Installer\setup.exe"  
   [0c8c:000e][2021-07-04T04:32:26] Download requested: https://go.microsoft.com/fwlink/?linkid=2066144  
   [0c8c:0018][2021-07-04T04:32:26] Attempting download 'https://go.microsoft.com/fwlink/?linkid=2066144' using engine 'WebClient'  
   [0c8c:0004][2021-07-04T04:32:26] Warning: Shutting down the application with exit code 1  
   [0c8c:0004][2021-07-04T04:32:26] Warning: A product matching the following parameters cannot be found:  \n  \nchannelId: VisualStudio.15.Release  \nproductId: Microsoft.Vi  
   sualStudio.Product.BuildTools  
   [0c8c:0001][2021-07-04T04:32:26] Releasing singleton lock.  
   [0c8c:0001][2021-07-04T04:32:26] Releasing singleton lock succeed.  
   [0c8c:0001][2021-07-04T04:32:26] Releasing singleton lock.  
   [0c8c:0001][2021-07-04T04:32:26] Singleton lock does not exist. Releasing singleton lock skipped.  
   [0c8c:0001][2021-07-04T04:32:26] Closing the installer with exit code 1  
   [0c8c:0001][2021-07-04T04:32:26] Exit Code: 1  
   [0c8c:0001][2021-07-04T04:32:26] Cleared previous session ID.  
   [0c8c:000a][2021-07-04T04:32:26] Finalizer completed successfully  
   [0c8c:0018][2021-07-04T04:32:26] Uri 'https://go.microsoft.com/fwlink/?linkid=2066144' redirected to 'https://vsstartpage.blob.core.windows.net/news/vs'  
   [0c8c:0018][2021-07-04T04:32:26] Download of 'https://go.microsoft.com/fwlink/?linkid=2066144' succeeded using engine 'WebClient'  
Community Center Not monitored
{count} votes

2 answers

Sort by: Most helpful
  1. Anna Xiu-MSFT 31,056 Reputation points Microsoft External Staff
    2021-07-05T08:10:35.42+00:00

    Hi @DaveO ,

    Welcome to Microsoft Q&A!

    Please navigate to the path: C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\layout and run the command: InstallCleanup.exe -full, which could help to remove the previous install cache.

    Then, run the following command to install it:
    Start-Process vs_BuildTools.exe -ArgumentList '--add', 'Microsoft.VisualStudio.Workload.MSBuildTools', '--add', 'Microsoft.VisualStudio.Workload.VCTools', '--quiet', '--norestart', '--nocache';

    Sincerely,
    Anna

    • If the answer is helpful, please click "Accept Answer" and upvote it.
      Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    0 comments No comments

  2. DaveO 6 Reputation points
    2021-07-15T10:20:27.157+00:00

    Hi Anna,

    I have performed the following steps:

    • Created a completely fresh AWS EC2 instance with Windows Server Base AMI (ami-0c774b4d5d8e1195e)
    • EC2 has full outbound access and no NACL rules restricting return traffic
    • EC2 has AWS IAM role for session manager, so I can use Systems Manager to connect to the instance via a Powershell terminal
    • I connect to the instance via Session Manager and cd to Administrator folder C:\Users\Administrator\Documents
    • I run Invoke-WebRequest -UseBasicParsing https://download.visualstudio.microsoft.com/download/pr/12210059/e64d79b40219aea618ce2fe10ebd5f0d/vs_BuildTools.exe -OutFile vs_BuildTools.exe; which downloads vs_BuildTools.exe
    • I run command Start-Process vs_BuildTools.exe -ArgumentList '--add', 'Microsoft.VisualStudio.Workload.MSBuildTools', '--add', 'Microsoft.VisualStudio.Workload.VCTools', '--quiet', '--norestart', '--nocache'; and the command returns almost immediately without any output
    • I go to C:\Windows\Temp where the Visual Studio install logs are and cat .\dd_installer_20210715100701.log and get the log output below with A product matching the following parameters cannot be found error.
    • I navigate to C:\Program Files (x86)\Microsoft Visual Studio and there is no MSBuild folder as I expect after a successful install [0550:0001][2021-07-15T10:07:02] Setting the locale to en-US.
      [0550:0001][2021-07-15T10:07:02] Writing the locale en-US to user.json.
      [0550:0001][2021-07-15T10:07:03] Saving the current locale (en-US) to user.json.
      [0550:0001][2021-07-15T10:07:03] Setting the telemetry services
      [0550:0003][2021-07-15T10:07:03] Creating a new telemetry service.
      [0550:0001][2021-07-15T10:07:04] Visual Studio Installer Version: 2.9.3366
      [0550:0001][2021-07-15T10:07:04] Raw Command line: "C:\Program Files (x86)\Microsoft Visual Studio\Installer\setup.exe" /finalizeInstall install --in "C:\ProgramData\Micro
      soft\VisualStudio\Packages_bootstrapper\vs_setup_bootstrapper_202107151006179504.json" --add Microsoft.VisualStudio.Workload.MSBuildTools --add Microsoft.VisualStudio.Wor
      kload.VCTools --quiet --norestart --nocache --locale en-US --activityId "79d222ee-6d02-4cb0-acd3-1251b29d6ce5"
      [0550:0001][2021-07-15T10:07:04] Parsed command line options: install --activityId 79d222ee-6d02-4cb0-acd3-1251b29d6ce5 --add Microsoft.VisualStudio.Workload.MSBuildTools
      Microsoft.VisualStudio.Workload.VCTools --channelId VisualStudio.15.Release --channelUri https://aka.ms/vs/15/release/channel --locale en-US --nocache --norestart --produc
      tId Microsoft.VisualStudio.Product.BuildTools --quiet
      [0550:0001][2021-07-15T10:07:05] Getting singleton lock.
      [0550:0001][2021-07-15T10:07:05] Getting singleton lock succeed.
      [0550:0003][2021-07-15T10:07:06] Telemetry property vs.willow.source : WPF
      [0550:0003][2021-07-15T10:07:06] Telemetry property vs.willow.locale : en-US
      [0550:0003][2021-07-15T10:07:06] Telemetry property vs.willow.installerversion : 2.9.3366.28650
      [0550:0003][2021-07-15T10:07:06] Telemetry property vs.willow.startmethod : indirect
      [0550:0003][2021-07-15T10:07:06] Telemetry property vs.willow.activityid : 79d222ee-6d02-4cb0-acd3-1251b29d6ce5
      [0550:0003][2021-07-15T10:07:06] Telemetry property vs.willow.campaign :
      [0550:0003][2021-07-15T10:07:06] Telemetry property vs.willow.passive : False
      [0550:0003][2021-07-15T10:07:06] Telemetry property vs.willow.quiet : True
      [0550:0003][2021-07-15T10:07:06] Telemetry property vs.willow.processtype : ui
      [0550:0003][2021-07-15T10:07:06] Telemetry property vs.willow.force : False
      [0550:0003][2021-07-15T10:07:06] Telemetry property vs.willow.noweb : False
      [0550:0003][2021-07-15T10:07:08] Creating new ExperimentationService
      [0550:0003][2021-07-15T10:07:08] Telemetry property VS.ABExp.Flights :
      [0550:0001][2021-07-15T10:07:08] Navigation requested from ApplicationViewModel to MainPageViewModel
      [0550:000b][2021-07-15T10:07:10] Telemetry property VS.ABExp.Flights : tn-vsmacnps-7;toggleblockcomment;tasmigddvs;multitenanttasmigration_002;vsfdevcom2;lsprmsgvol;debugg
      er-init-async
      [0550:0008][2021-07-15T10:07:10] Telemetry property VS.SetupEngine.ChannelUpdateDisabled : False
      [0550:000d][2021-07-15T10:07:11] Uri 'https://go.microsoft.com/fwlink/?linkid=857708' redirected to 'https://sendvsfeedback2.azurewebsites.net/api'
      [0550:0008][2021-07-15T10:07:11] Download requested: https://aka.ms/vs/15/release/channel
      [0550:0011][2021-07-15T10:07:11] Attempting download 'https://aka.ms/vs/15/release/channel' using engine 'WebClient'
      [0550:000b][2021-07-15T10:07:11] Telemetry property VS.ABExp.Flights : lazytoolboxinit;fwlargebuffer;refactoring;spmoretempsbtn1;asloff;keybindgoldbarext;asynccsproj;vsfri
      cheditor;completionapi;tn-vsmacnps-7;toggleblockcomment;tasmigddvs;multitenanttasmigration_002;vsfdevcom2;lsprmsgvol;debugger-init-async
      [0550:0011][2021-07-15T10:07:12] Uri 'https://aka.ms/vs/15/release/channel' redirected to 'https://download.visualstudio.microsoft.com/download/pr/1740390e-2a19-48d7-a883-
      666344e7fddf/e6c420f042edc7213d29ed6b6a1895d87517030abe30fe602ffefa7a6ecaf048/VisualStudio.15.Release.chman'
      [0550:0011][2021-07-15T10:07:12] ManifestVerifier Result: Success
      [0550:0011][2021-07-15T10:07:12] Download of 'https://aka.ms/vs/15/release/channel' succeeded using engine 'WebClient'
      [0550:0008][2021-07-15T10:07:15] Telemetry property vs.setup.WorkloadOverrides.DidReceiveOverride : False
      [0550:0008][2021-07-15T10:07:15] Telemetry property vs.setup.WorkloadOverrides.RuleId : None
      [0550:000c][2021-07-15T10:07:16] Downloading installable manifest from "https://download.visualstudio.microsoft.com/download/pr/1740390e-2a19-48d7-a883-666344e7fddf/af8563
      81157ef094c3658c1ffc146d359e576b4e68a85d1934cb9b6beee6898f/VisualStudio.vsman" and using the channel URI "https://aka.ms/vs/15/release/channel".
      [0550:000c][2021-07-15T10:07:16] Download requested: https://download.visualstudio.microsoft.com/download/pr/1740390e-2a19-48d7-a883-666344e7fddf/af856381157ef094c3658c1ff
      c146d359e576b4e68a85d1934cb9b6beee6898f/VisualStudio.vsman
      [0550:000d][2021-07-15T10:07:16] Attempting download 'https://download.visualstudio.microsoft.com/download/pr/1740390e-2a19-48d7-a883-666344e7fddf/af856381157ef094c3658c1f
      fc146d359e576b4e68a85d1934cb9b6beee6898f/VisualStudio.vsman' using engine 'WebClient'
      [0550:000d][2021-07-15T10:07:20] ManifestVerifier Result: Success
      [0550:000d][2021-07-15T10:07:20] Download of 'https://download.visualstudio.microsoft.com/download/pr/1740390e-2a19-48d7-a883-666344e7fddf/af856381157ef094c3658c1ffc146d35
      9e576b4e68a85d1934cb9b6beee6898f/VisualStudio.vsman' succeeded using engine 'WebClient'
      [0550:000c][2021-07-15T10:07:20] Warning: Shutting down the application with exit code 1
      [0550:000c][2021-07-15T10:07:20] Warning: A product matching the following parameters cannot be found: \n \nchannelId: VisualStudio.15.Release \nproductId: Microsoft.Vi
      sualStudio.Product.BuildTools
      [0550:0001][2021-07-15T10:07:20] Releasing singleton lock.
      [0550:0001][2021-07-15T10:07:20] Releasing singleton lock succeed.
      [0550:0001][2021-07-15T10:07:21] Releasing singleton lock.
      [0550:0001][2021-07-15T10:07:21] Singleton lock does not exist. Releasing singleton lock skipped.
      [0550:0003][2021-07-15T10:07:21] Download requested: https://go.microsoft.com/fwlink/?linkid=2066144
      [0550:0001][2021-07-15T10:07:21] Closing the installer with exit code 1
      [0550:0001][2021-07-15T10:07:21] Exit Code: 1
      [0550:0012][2021-07-15T10:07:21] Attempting download 'https://go.microsoft.com/fwlink/?linkid=2066144' using engine 'WebClient'
      [0550:0008][2021-07-15T10:07:21] Created shortcut: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio Installer.lnk
      [0550:0008][2021-07-15T10:07:21] Starting C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.windows.exe with arguments /finalizeinstall 6F320B93-EE3C-4
      826-85E0-ADF79F8D4C61 "Visual Studio Installer" "Microsoft Visual Studio Installer" 2.9.3366.28650 0 "C:\Program Files (x86)\Microsoft Visual Studio\Installer\setup.exe"
      [0550:0012][2021-07-15T10:07:22] Uri 'https://go.microsoft.com/fwlink/?linkid=2066144' redirected to 'https://vsstartpage.blob.core.windows.net/news/vs'
      [0550:0012][2021-07-15T10:07:22] Download of 'https://go.microsoft.com/fwlink/?linkid=2066144' succeeded using engine 'WebClient'
      [0550:0008][2021-07-15T10:07:22] Finalizer completed successfully

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.