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

2

0

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.

Carnot answered 14/10 at 5:3 Comment(7)
Manually run this "c:\windows\syswow64\\windowspowershell\v1.0\powershell.exe" from admin prompt, it is hanging. After 5 min or so, an eror dialog is popped up saying "Debug" or "Close. Also, had run dism /online /Cleanup-Image /StartComponentCleanup, sfc /scannow , dism /Online /Cleanup-Image /RestoreHealth, but to no avail. The dism did not find a problem.Carnot
If you do the followings:1. Install the latest powershell from here 2.Replace the old one 3. manually download and install VisualCpp.Redist pacakge. 4 Repair or Reinstall your VS. will it work?Eboni
After copy C:\Windows\System32\WindowsPowerShell\v1.0 to C:\Windows\SysWOW64\WindowsPowerShell folder (renamed exiting v1.0 to v1.0-32bit before copy), the installation is OK, but VS 2019 still cannot run with the same error. Now, just tried your command, ` "C:\ProgramData\Microsoft\VisualStudio\Packages\Microsoft.VisualCpp.Redist.14,version=14.40.33816,chip=x86\VCRedistInstall.ps1", it immediately returns without anything on the PS terminal screen. Also, tried repairing VS 2019, but still the same error. VS 2022 is running OK now. But, I need VS 2019.Carnot
I would suggest perform an OS reset or reinstall. don't forget to backup your data first.Kleper
If you delete this folder ""C:\ProgramData\Microsoft\VisualStudio\Packages\Microsoft.VisualCpp.Redist.14,version=14.40.33816,chip=x86" and manually install it from "aka.ms/vs/17/release/vc_redist.x86.exe" and reinstall, will it unblock?Eboni
All problems were resolved after uninstalled those auto updates on the top of 22h2.Carnot
Hi @James1, glad to hear you issue has been resolved. You can add your solution as an answer. This will help other users who has the same issue to find the solution easily. Just a reminder ;)Eboni
C
0

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.

Carnot answered 15/10 at 8:55 Comment(0)
E
0

From looking at your log,

‘Microsoft.VisualCpp.Redist.14,version=14.40.33810,chip=x86’ failed to install with the unknown error (0xc0000005)

Error 0xc0000005 (Access Violation) error is usually caused by your computer not being able to correctly process the files and settings required to run a particular program or installation. For this issue, please check the following suggestions:

1.Please check if you have 3rd party anti-virus software enabled or enterprise group policy in place that maybe be blocking the installer.

2.Trt to manually download and install the latest supported Microsoft Visual C++ from the page: https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#latest-microsoft-visual-c-redistributable-version, after that, please check this installation again.

3.If the package fails to install, try to check the new error message shows in the pop-up window. If new error message mentions an old version of this same redistributable package, try to uninstall that old version by using the troubleshooter tool, and then reinstall the redistributable package(14.40).

4.Run the following two commands in CMD(run as admin) to fix the system files issue

 DISM.exe /Online /Cleanup-image /Restorehealth
 sfc /scannow

For more information, please refer to Use the System File Checker tool to repair missing or corrupted system files

Eboni answered 14/10 at 7:38 Comment(3)
Seriously? Error 0xc0000005 (Access Violation) is almost always caused by a programming bug, which includes forgetting error handling. Now ideas 2 & 3 are reasonable workarounds. If you run different code, you might be able to sidestep the bug.Essen
Tried the above methods, the problem is not resolved. Also, noticed some similar problems with sysWoW64's powershell.exe from other users, eg, this one and another one. I may need replace powershell.exe that came with Windows 10 22H2 with github's or some other working version.Carnot
If you manually run C:\ProgramData\Microsoft\VisualStudio\Packages\Microsoft.VisualCpp.Redist.14,version=14.40.33816,chip=x86\VCRedistInstall.ps1, can it work? Also, a similar issue:this oneEboni
C
0

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.

Carnot answered 15/10 at 8:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.