Visual Studio 2022 Install Failure - Microsoft.VisualCpp.Redist.14;PackageAction=Install;ReturnCode=1921
Asked Answered
C

8

6

When attempting to install Visual Studio 2022 (same issue when attempting to install Visual Studio 2019), once the installation gets to a certain point it reports the following:

"Sorry, something went wrong" Couldn't install Microsoft.VisualCpp.Redist.14

Here is the 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

================================================================================ Package 'Microsoft.VisualCpp.Redist.14,version=14.34.31931,chip=x86' failed to install. Search URL https://aka.ms/VSSetupErrorReports?q=PackageId=Microsoft.VisualCpp.Redist.14;PackageAction=Install;ReturnCode=1921 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.34.31931,chip=x86\VCRedistInstall.ps1""" -PayloadDirectory """C:\ProgramData\Microsoft\VisualStudio\Packages\Microsoft.VisualCpp.Redist.14,version=14.34.31931,chip=x86""" -Architecture x86 -Logfile """C:\Users\jbeaumont\AppData\Local\Temp\dd_setup_20221128140210_221_Microsoft.VisualCpp.Redist.14.log"""; exit $LastExitCode" Return code: 1921 Return code details: The name of the file cannot be resolved by the system. Log C:\Users\jbeaumont\AppData\Local\Temp\dd_setup_20221128140210_221_Microsoft.VisualCpp.Redist.14.log Impacted workloads .NET desktop development (Microsoft.VisualStudio.Workload.ManagedDesktop,version=17.4.33006.217,productarch=x64) ASP.NET and web development (Microsoft.VisualStudio.Workload.NetWeb,version=17.4.33006.217,productarch=x64) Impacted components .NET Debugging with WSL (Microsoft.VisualStudio.Component.WslDebugging,version=17.4.33006.217) .NET desktop development tools (Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites,version=17.4.33006.217) .NET profiling tools (Microsoft.VisualStudio.Component.DiagnosticTools,version=17.4.33006.217) ASP.NET and web development prerequisites (Microsoft.VisualStudio.Component.Web,version=17.4.33006.217) ASP.NET and web development prerequisites (Microsoft.VisualStudio.ComponentGroup.Web,version=17.4.33006.217) Azure WebJobs Tools (Component.Microsoft.VisualStudio.Web.AzureFunctions,version=17.4.33006.217) Azure WebJobs Tools (Microsoft.VisualStudio.ComponentGroup.AzureFunctions,version=17.4.33006.217) C# and Visual Basic (Microsoft.VisualStudio.Component.Roslyn.LanguageServices,version=17.4.33006.217) Cloud tools for web development (Microsoft.VisualStudio.ComponentGroup.Web.CloudTools,version=17.4.33006.217) Data sources for SQL Server support (Microsoft.VisualStudio.Component.SQL.DataSources,version=17.4.33006.217) Development tools for .NET (Microsoft.NetCore.Component.DevelopmentTools,version=17.4.33006.217) F# language support (Microsoft.VisualStudio.Component.FSharp,version=17.4.33006.217) F# language support for web projects (Microsoft.VisualStudio.Component.FSharp.WebTemplates,version=17.4.33006.217) Live Share (Component.Microsoft.VisualStudio.LiveShare.2022,version=1.0.5716) Managed Desktop Workload Core (Microsoft.VisualStudio.Component.ManagedDesktop.Core,version=17.4.33006.217) Razor Language Services (Component.Microsoft.VisualStudio.RazorExtension,version=17.4.33006.217) SQL Server Data Tools (Microsoft.VisualStudio.Component.SQL.SSDT,version=17.4.33006.217) Web development tools for .NET (Microsoft.NetCore.Component.Web,version=17.4.33006.217)

Country answered 28/11, 2022 at 19:14 Comment(8)
Hum, not a common problem. I assume downloaded the install, right clicked, used un-block (like one REALLY should do for every download). And then right click and choose run as administrator. I would also consider not using local db, and install sql express as a separate install. However, as noted, I don't see and can't find any significant numbers of people having a problem installing vs2022. I done it a number of times, and never an issue. So, try un-blocking the downloaded file (don't we all?). And try running that installer as admin - see if both of these help.Server
Not sure what unblock is as there is no issue running the downloaded install .exe. I don't see any option within the properties of the .exe that allows someone to unblock, but like I said, the install runs. I run as administrator, no effect. Still the same issue. I dunno, you click the link in the log file and there are pages and pages and pages of issues with the latest versions of the install file for Visual Studio. Not many with the return code (1921) I am getting, but tens of thousands of similar issues.Country
I've completely removed the install using Revo Uninstaller which removes the install, all registry entries and temp files, run a Windows system scan to look for outdated system files and update, made sure there are no other versions of Visual Studio anywhere on the machine AND even attempted installing Visual Studio 2019, same results.Country
I explain what un-blocking a file after downloading is below. As noted, this is unlikely your issue, but at least you might as well learn how after downloading a file, you often want (and need) to un-block a file. Do note that vs2022 is the FIRST edition of vs that is x64 bits. However, I doubt you running a x32 os these days. (but, since 2019 is x32 bits, then you eliminated that issue). As noted, at a loss as to why 2019 or 2022 is not working. I assume you attempted this with virus software turned off?Server
Running 64bit only. Disabled anti-virus. No change. Not a blocking issue as I mentioned below, that isn't even a choice on the General properties tab of any file on my system.Country
Hum, as noted, I not seen nor had this issue (and few do). I would check out this #71489613Server
Does this can help you to solve this problem. It seems not an issue about "Return code: 1921 Return code details: The name of the file cannot be resolved by the system. Log", you can create an issue on DC to report this problem.Kennithkennon
Yes, I reached out to Microsoft and we located the issue. As always, bad, bad, BAD error message. The issue was with a FOLDER, not a FILE. Don't display an error stating the system could not resolve the FILE when the issue is a FOLDER! Posting the answer below.Country
C
1

The offending issue was the following folder: C:\ProgramData\Package Cache

It appears that somehow, this folder was changed from a folder to some sort of symbolic shortcut that was not accessible. It was semi-greyed out with a small arrow icon on the folder icon indicating it was a shortcut. Clicking on it resulted in the error "System is unable to resolve the file". Again, this is a FOLDER, not a FILE.

Anyways, I deleted the "shortcut" and recreated C:\ProgramData\Package Cache as a normal folder and now everything is installing fine.

Country answered 29/11, 2022 at 14:5 Comment(2)
Hi, glad to know you've found the solution to resolve this issue! You can click '✔' to accept your answer. See can I answer my own question., Just a reminder :) It will also help others to solve the similar issue.Kennithkennon
This solution seems to be specific to your system. How could that folder become a shortcut? It must be some kind of corruptions in the disk.Karol
N
13

I had the same error, and this is how I fixed it:

  1. Download and install both x64 and x86 version of the Microsoft Visual C++ Redistributable package from here.
  2. Restart your PC.
  3. Temporarily disable your antivirus.
  4. From the Visual Studio Installer, repair your Visual Studio Installation. (This will take some time)
  5. Enable your antivirus.
Neurasthenic answered 28/11, 2023 at 20:35 Comment(3)
Exactly these are the steps that worked for me, For me Steps 1 , 2 and 4 was enough. Disabling antivirus was not required. These are solutions that Chat GPT or AI cannot solve without humans. Humans are always unique guys :) Thank you.Apple
This solved my issue as well. All these packages should be installed when VS is being repaired or installed, wasted few hours on this.Frisch
This solution is not ideal, because it hides the real problems behind it. The powershell script in the installer should be able to get those things on the fly unless the system blocks some features of powershell scripts that comes with the installer. See this postKarol
C
1

The offending issue was the following folder: C:\ProgramData\Package Cache

It appears that somehow, this folder was changed from a folder to some sort of symbolic shortcut that was not accessible. It was semi-greyed out with a small arrow icon on the folder icon indicating it was a shortcut. Clicking on it resulted in the error "System is unable to resolve the file". Again, this is a FOLDER, not a FILE.

Anyways, I deleted the "shortcut" and recreated C:\ProgramData\Package Cache as a normal folder and now everything is installing fine.

Country answered 29/11, 2022 at 14:5 Comment(2)
Hi, glad to know you've found the solution to resolve this issue! You can click '✔' to accept your answer. See can I answer my own question., Just a reminder :) It will also help others to solve the similar issue.Kennithkennon
This solution seems to be specific to your system. How could that folder become a shortcut? It must be some kind of corruptions in the disk.Karol
S
0

Not sure what unblock is as there is

If you download a file or just about anything?

You as a general rule want to un-block:

That is this option (right click, or now often with win 11, right click and more options). quite sure this un-block security feature been around for some time - at least win 10, and I think even previous editions of windows had this option.

enter image description here

Now, I don't think the above is your issue, but of course it is one of the first things one will do when having downloaded a file.

In fact, for zip files you REALLY have to pay attention to above. For example, if I share some code - and in that zip file some .dll's? they do NOT work unless you un-block before you un-zip. (or un-block each file after un-zipping).

So, the above is quite much a basic skill set you will have when dealing with any downloaded file(s). As I stated, this un-likely is your issue, but since the basic sill set in downloading a file and un-blocking seemed confusing to you, the above basic skill set is quite much part of a survival guide if you going to use the internet and download a file.

Server answered 29/11, 2022 at 1:37 Comment(3)
I'm not "confused". There is no file I inspect via Properties in my version of Windows 10 that contains the "Unblock" checkbox. If I've never seen that, and I never have, then I am not confused. Plus, that's not the issue here. Yes, I disable ESET (anti-virus), still same issue.Country
Well, it not the end of the world, but is a VERY good FYI to know. If you developing software and download even a simple zip file with some .dlls', and then copy them into produciton code, they IWLL STILL have that blocked atribuote, and code can fail. So, it just a good FYI. It a basic skill set required to download files - even if it did not affect you, you now are simple aware of the basic skills required to download a file, and this information in the future can save you great pain - it has for me, and as a result, when downloading files, it one of the first things I check.Server
Appreciate the advice and I will definitely look for it going forward. I found the issue and will post it as the answer.Country
E
0

I had error "Microsoft.VisualCpp.Redist.14;PackageAction=Install;ReturnCode=87"

What helped me was moving all files from "C:\Windows\SysWOW64\WindowsPowerShell\v1.0" to "C:\Windows\System32\WindowsPowerShell\v1.0"

Erinerina answered 15/11, 2023 at 12:17 Comment(0)
L
0

My case: I'm using standard windows account without admin privileges, when I need to install something I just provided admin password. When clicking on show logs I was getting some random folder open and nothing else. Fix:

  1. Relog to admin account and try to repair (same error), but now Show Logs is showing some text files with logs
  2. In the logs it was pointing me to x86 package of Microsoft.VisualCpp.Redist.14. Went there and installed this manually
  3. Try to repair again, same error, but logs now pointed me to x64 package
  4. Installed x64 package manually same as in point 2
  5. Done some restarts when asked to and then went for repair one more time. This time it was successful
Lawn answered 29/12, 2023 at 13:13 Comment(1)
This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. To get notified when this question gets new answers, you can follow this question. Once you have enough reputation, you can also add a bounty to draw more attention to this question. - From ReviewPhung
F
0

I had a similar problem, visual c++ 14 x86 had failed to install. Upon inspection of the log it read, Group policy was preventing the installation.

Upon further inquired, my system admin had a policy that prevents application from running windows PowerShell. Similarly, I was not in a position to launch PowerShell from its original path C:\Windows\System32\WindowsPowerShell\v1.0

When the policy was updated, a repair of VS from the installer fixed the issue.

Fortunato answered 18/3 at 11:23 Comment(0)
D
0

I got a similar issue with "Microsoft.VisualCpp.Redist.14", also related to problems with Powershell. In my case, it was the issue that winget package manager somehow was detached from shell. To fix that I run "Add-AppxPackage -Path https://cdn.winget.microsoft.com/cache/source.msix". I found the solution here on github

Dreibund answered 8/7 at 17:55 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Kondon
P
-1

This might help.

I was installing Desktop development with C++ via Visual Studio Installer. On the error popup with message Couldn't install Microsoft.VisualCpp.Redist.14.Latest there is View Logs option.

Error log should state: Error opening installation log file. Verify that the specified log file location exists and that you can write to it. Installation log file location should be C:\Users[user]\AppData\Local\Temp. Give everyone rights to Temp folder: right click on the Temp folder -> Properties -> Security tab -> Edit -> Add -> type Everyone -> click on Check Names -> OK -> check Full control -> Apply -> OK -> OK. Error log contains name of the installation log and it should be something like this: dd_setup_xxxxxxxxxxxxxx_001_Microsoft.VisualCpp.Redist.14.Latest.log. xxxxxxxxxxxxxx part should represent date and time ,for example 20220812175204. In the Temp folder find the given installation log file and check if Everyone has full control over it, similarly as previously described. It should be so, but if not, set it yourself. I think each installation try has its own installation log, with specific date and time in installation log's name and Everyone doesn't have full control over that new log, as it is created after full control is given to everyone, but I am not sure. Therefore, failed installation's step should be continued.

Error log contains one more path. That is path to installation file. The path should be something like: C:\ProgramData\Microsoft\VisualStudio\Packages\Microsoft.VisualCpp.Redist.14.Latest,version=xx.xx.xxxxx,chip=x86. Open that location. There should be an application named something like VC_redist.x86. Run it.

After this, I've run Desktop development with C++ via Visual Studio Installer and it completed successfully.

Reference : https://learn.microsoft.com/en-us/answers/questions/879993/vs-2022-couldnt-install-microsoft-visualcpp-redist

Protuberate answered 10/1 at 1:2 Comment(1)
Your answer seems to be unrelated with the error presentedBougainville

© 2022 - 2024 — McMap. All rights reserved.