Update Visual Studio 2022 which is missing v142 MFC
Tool name
Visual Studio 2022
Tool license
unchanged
Add or update?
- [ ] Add
- [x] Update
Desired version
17.x
Approximate size
No response
Brief description of tool
The Visual Studio 2022 installed on the windows-2022 image has the 'v142' platform toolset which means it can build VS 2019 projects. Since windows-2019 is being deprecated, I moved to this version.
Unfortunately, the windows-2022 image is missing Microsoft.VisualStudio.Component.VC.14.29.16.11.MFC which means building VS 2019 v142 MFC projects fails.
URL for tool's homepage
No response
Provide a basic test case to validate the tool's functionality.
Platforms where you need the tool
- [ ] Azure DevOps
- [x] GitHub Actions
Runner images where you need the tool
- [ ] Ubuntu 22.04
- [ ] Ubuntu 24.04
- [ ] macOS 13
- [ ] macOS 13 Arm64
- [ ] macOS 14
- [ ] macOS 14 Arm64
- [ ] macOS 15
- [ ] macOS 15 Arm64
- [ ] Windows Server 2019
- [x] Windows Server 2022
- [ ] Windows Server 2025
Can this tool be installed during the build?
No. The Visual Studio installation is part of the image.
Tool installation time in runtime
No response
Are you willing to submit a PR?
No response
Hi We are validating your request and will continue to update here with details regarding options to include or rejections, if any.
Hello! I would like to add that this issue is also critical for me, as I cannot build C++ ATL COM objects using windows-2022 or 2025 images.
What I generally need is these components:
- Microsoft.VisualStudio.Component.VC.Tools.x86.x64
- Microsoft.VisualStudio.Component.VC.ATL
- Microsoft.VisualStudio.Component.VC.ATLMFC
I am struggling almost a week trying to manage my pipeline to work and Im somehow desperate. Windows-2019 contained next components that were required for building our C++ ATL COM objects: https://github.com/actions/runner-images/blob/win19/20250609.1/images/windows/Windows2019-Readme.md
I am trying to install these components with visual studio installer as a pipeline step, but it seems not installed properly:
- task: PowerShell@2
continueOnError: true
enabled: false
displayName: Install ATL and MFC build tools
inputs:
targetType: inline
showWarnings: true
script: |
echo "Download vs_enterprise.exe"
Invoke-WebRequest -Uri "https://aka.ms/vs/17/release/vs_enterprise.exe" -OutFile "vs_enterprise.exe"
echo "Install ATL and MFC"
$process = Start-Process -FilePath "./vs_enterprise.exe" -ArgumentList @(
"modify",
"--installPath", '"C:\Program Files\Microsoft Visual Studio\2022\Enterprise"',
"--add", "Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
"--add", "Microsoft.VisualStudio.Component.VC.ATL",
"--add", "Microsoft.VisualStudio.Component.VC.ATLMFC",
"--passive", "--norestart"
) -Wait -PassThru
Write-Output $process.ExitCode
echo "ATL and MFC have been installed"
I tried this script locally and it works just fine. But maybe due to some limitation on agent side, the installation does not complete properly. I receive the same error with or without this step: error MSB8041: MFC libraries are required for this project. Install them from the Visual Studio installer (Individual Components tab) for any toolsets and architectures being used.
If you add ATL/MFC components to windows-2022 or windows-2025 images, it would unblock us. Otherwise, we are just blocked by deprecation of windows-2019 machine and will need to create own hosted environment, which we do not want to.
@walbourn , it seems that your post somehow helped me, IDK.
I tried one more time and just corrected the list of components to be installed. And it worked as a charm. My C++ ATL COM objects have been built successfully.
I share the pipeline step that installs proper packages.
- task: PowerShell@2
continueOnError: true
displayName: Install ATL and MFC build tools
inputs:
targetType: inline
showWarnings: true
script: |
echo "Download vs_enterprise.exe"
Invoke-WebRequest -Uri "https://aka.ms/vs/17/release/vs_enterprise.exe" -OutFile "vs_enterprise.exe"
echo "Install ATL and MFC"
$process = Start-Process -FilePath "./vs_enterprise.exe" -ArgumentList @(
"modify",
"--installPath", '"C:\Program Files\Microsoft Visual Studio\2022\Enterprise"',
"--add", "Microsoft.VisualStudio.Component.VC.14.29.16.11.MFC",
"--add", "Microsoft.VisualStudio.Component.VC.14.29.16.11.ATL",
"--add", "Microsoft.VisualStudio.Component.VC.14.29.16.11.x86.x64",
"--add", "Microsoft.VisualStudio.ComponentGroup.VC.Tools.142.x86.x64",
"--passive", "--norestart"
) -Wait -PassThru
Write-Output $process.ExitCode
echo "ATL and MFC have been installed"
If you by some reason need other MFC components, I took proper names from this page https://learn.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-enterprise?view=vs-2022.
It takes 12-15 minutes to install everything, so expect that pipeline time will increase. Hope they will add ATL and MFC packages to supported images.
Hi @walbourn , It got fixed with new image rollout , kindly validate and confirm.
cc @dmitriyrudyka
Hi @walbourn
The new version of VS has been made available with the latest rollout. I am closing this issue as resolved. Please let me know if you have any concerns