windowspowershellinstallationvisual-studio-2019

Why Visual Studio 2019 cannot launch on Windows 10 22h2?


Recently, after upgraded my Windows 10 to Windows 10 22h2 (build 19045), Visual Studio 2019 cannot start, because the 32 bit version of powershell.exe is failing:

"c:\windows\syswow64\windowspowershell\v1.0\powershell.exe"

Then, I run Visual Studio Installer to repair VS 2019 (ver. 16.11.41), but the repair is also failed.

Note: I have to use VS 2019 for my work. But, I also tried to install VS 2022 community version, it is also failed at the above powershell.exe. The 32 bit apps can still run Windows 10 64 bit 22h2, why not the 32 bit version of powershell.exe?

The specific error log:

Something went wrong with the install.

You can troubleshoot the package failures by:

    1. Search for solutions using the search URL below for each package failure
    2. Modify your selections for the affected workloads or components and then retry the installation
    3. Remove the product from your machine and then install again

If the issue has already been reported on the Developer Community, you can find solutions or workarounds there. If the issue has not been reported, we encourage you to create a new issue so that other developers will be able to find solutions or workarounds. You can create a new issue from within the Visual Studio Installer in the upper-right hand corner using the "Provide feedback" button.

================================================================================

Package 'Microsoft.VisualCpp.Redist.14,version=14.40.33816,chip=x86' failed to install.
    Search URL
        https://aka.ms/VSSetupErrorReports?q=PackageId=Microsoft.VisualCpp.Redist.14;PackageAction=Install;ReturnCode=-1073741819
    Details
        Command executed: "c:\windows\syswow64\\windowspowershell\v1.0\powershell.exe" -NoLogo -NoProfile -Noninteractive -ExecutionPolicy Unrestricted -InputFormat None -Command "& """C:\ProgramData\Microsoft\VisualStudio\Packages\Microsoft.VisualCpp.Redist.14,version=14.40.33816,chip=x86\VCRedistInstall.ps1""" -PayloadDirectory """C:\ProgramData\Microsoft\VisualStudio\Packages\Microsoft.VisualCpp.Redist.14,version=14.40.33816,chip=x86""" -Architecture x86 -Logfile """C:\Users\username\AppData\Local\Temp\dd_setup_20241013044643_002_Microsoft.VisualCpp.Redist.14.log"""; exit $LastExitCode"
        Return code: -1073741819
        Return code details: Unknown error (0xc0000005)

After uninstalled VS 2019, then reinstalled it, but the problem is the same. VS 2022 community reinstallation is also failed. I expect that both VS 2019 pro and VS 2022 community installation should work on Windows 10 22h2 based on Visual Studio download link.


Solution

  • All problems are resolved after removed all those auto updates on the top of Windows 10 22h2. Now, sysWOW64's 32 bit version of powershell.exe works well on Win10 22h2, and Visual Studio 2019 also works great again. There is absolutely no compatibility issues between VS 2019 and Win10 22h2. The problems were those automated updates on the top of Win10 22h2. It appears that Win10 22h2 does not allow the complete stop of auto updates, but only allow "pause auto updates for 7 days" as an option. After all, Win10 22h2 shows much better performance than the previous versions.