Visual Studio 2022- Couldn't install Microsoft.VisualCpp.Redist.14

OldIslander 25 Reputation points
2024-05-26T23:35:26.9733333+00:00

I'm trying to install Desktop development with C++ for Visual Studio 2022.

Attempting to install this using the Visual Studio Installer returns an error stating: Couldn't install Microsoft.VisualCpp.Redist.14

The log file mentions another log file that it cannot write to. I've pasted its contents into the body of this question.

In troubleshooting this issue I've attempted the first two solutions provided in this post: https://learn.microsoft.com/en-us/answers/questions/879993/vs-2022-couldnt-install-microsoft-visualcpp-redist

I'm baffled. The file exists and Everyone has write/modify access to it. I've installed this using the VSIX file provided on https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170. Nothing allows me to create a project with the appropriate template. At this point, I can't even imagine what the issue is.

Log file VVVVVVVVVVVVVVVVVVVVVVVV

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.33810,chip=x64' failed to install.

```powershell
Search URL

    https://aka.ms/VSSetupErrorReports?q=PackageId=Microsoft.VisualCpp.Redist.14;PackageAction=Install;ReturnCode=-2147023274

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.33810,chip=x64\VCRedistInstall.ps1""" -PayloadDirectory """C:\ProgramData\Microsoft\VisualStudio\Packages\Microsoft.VisualCpp.Redist.14,version=14.40.33810,chip=x64""" -Architecture x64 -Logfile """C:\Users\Sean G\AppData\Local\Temp\dd_setup_20240526192341_044_Microsoft.VisualCpp.Redist.14.log"""; exit $LastExitCode"

    Return code: -2147023274

    Return code details: Error opening installation log file. Verify that the specified log file location exists and that you can write to it.

Log

    C:\Users\Sean G\AppData\Local\Temp\dd_setup_20240526192341_044_Microsoft.VisualCpp.Redist.14.log

Impacted workloads

    Desktop development with C++ (Microsoft.VisualStudio.Workload.NativeDesktop,version=17.10.34803.213,productarch=x64)

Impacted components

    C# and Visual Basic (Microsoft.VisualStudio.Component.Roslyn.LanguageServices,version=17.10.34803.213)

    C++ 2022 Redistributable Update (Microsoft.VisualStudio.Component.VC.Redist.14.Latest,version=17.10.34803.213)

    C++ CMake tools for Windows (Microsoft.VisualStudio.Component.VC.CMake.Project,version=17.10.34803.213)

    C++ core desktop features (Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core,version=17.10.34803.213,productarch=x64)

    C++ profiling tools (Microsoft.VisualStudio.Component.VC.DiagnosticTools,version=17.10.34803.213)

    GitHub Copilot (Component.VisualStudio.GitHub.Copilot,version=0.2.889.30432)

    Graphics debugger and GPU profiler for DirectX (Microsoft.VisualStudio.Component.Graphics.Tools,version=17.10.34803.213,productarch=x64)

    Live Share (Component.Microsoft.VisualStudio.LiveShare.2022,version=1.0.5919)

    MSVC v143 - VS 2022 C++ x64/x86 build tools (Latest) (Microsoft.VisualStudio.Component.VC.Tools.x86.x64,version=17.10.34803.213)
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,814 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,608 questions
0 comments No comments
{count} votes

Accepted answer
  1. Tianyu Sun-MSFT 28,931 Reputation points Microsoft Vendor
    2024-05-27T06:35:51.12+00:00

    Hello @OldIslander ,

    Welcome to Microsoft Q&A forum.

    I’ve installed this … Nothing allows me to create a project with the appropriate template.

    If the Visual C++ Redistributable package still wasn’t installed correctly, please kindly try the solution that shared by Allan and Yiwen here: PackageId:Microsoft.VisualCpp.Redist.14;PackageAction:Install;ReturnCode:-2147023274;

    Launch command prompt as administrator

    Type "set tmp=C:\Temp" and "set temp=C:\Temp"

    Launch installer from this command prompt

    You can search "command prompt" in Windows Search box and run it as administrator.

    Some other suggestions and methods that you can try:

    1. Reboot your machine, rename %Temp% folder(C:\Users\username\AppData\Local\Temp) and reinstall/repair VS.
    2. Update Windows OS and make sure that no Windows Update issues exist.
    3. Try to run the Setup file as administrator.

    Besides, if you try to manually open that installation log file and try to modify something, for example, type some words, save it, then reopen it and remove these words, will you get any permission errors? If multiple users use this machine, does it work for the administrator account(user)?

    Please feel free to contact us and let us know the result.

    Best Regards,

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.

    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Rajesh Rohan 0 Reputation points
    2024-06-20T17:55:54.09+00:00
         I have faced same issue , and i successfully resolved.
    

    step 1 : in c drive ,create a temp folder if not present, give it full control (right click folder, in properties, edit, select user, check full control).

    Step 2 : open cmd as admin, and do these below commands :

    set tmp=C:\Temp

    set temp=C:\Temp

    Step 3 : go to visual studio installer folder and execute it there .

    cd C:\Users\YourUsername\Downloads setup.exe

    0 comments No comments