Visual Studio installer / extension install can't run (errors)

moo2u2 41 Reputation points
2023-02-02T09:53:35.99+00:00

I have been using Visual Studio 2022 Professional without issues for a while now, but I noticed in the last few weeks or so that I can't install extensions, and can't even open the VS Installer or uninstall!

I'm including both of these as they seem to be related:

  1. Can't run Visual Studio installer. In event viewer I see these 2 errors.
    I decompiled UserSettingsSerializer (mentioned below) and it doesn't seem to reference any files so I have no idea how FileNotFoundException is being thrown...
   Application: setup.exe
   Framework Version: v4.0.30319
   Description: The process was terminated due to an unhandled exception.
   Exception Info: System.IO.FileNotFoundException
      at Microsoft.VisualStudio.Setup.Services.UserSettingsSerializer..ctor(System.IServiceProvider)
      at Microsoft.VisualStudio.Setup.Services.InstallerUserSettingsRepository..ctor(System.IServiceProvider)
      at Microsoft.VisualStudio.Setup.Installer.Program.CreateProgramServices(System.String[])
      at Microsoft.VisualStudio.Setup.Installer.Program.Main(System.String[])
   
   

Faulting application name: setup.exe_Visual Studio, version: 3.4.2246.31370, time stamp: 0x9f869e74
Faulting module name: KERNELBASE.dll, version: 10.0.19041.2546, time stamp: 0xe8e9ac9b
Exception code: 0xe0434352
Fault offset: 0x000000000002cd29
Faulting process ID: 0x4a40
Faulting application start time: 0x01d936eaf0409aba
Faulting application path: C:\Program Files (x86)\Microsoft Visual Studio\Installer\setup.exe
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report ID: 08b1992f-8d33-4909-bb42-25415d20a76b
Faulting package full name:
Faulting package-relative application ID:

  1. Can't install any Visual Studio extensions, I seem to get the same error for any extension I try to install or update
    Could not load file or assembly 'Microsoft.Identity.Client, Version=4.30.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040).

The only thing I can find online is this post indicating that their fix was to factory reset Windows, which I can't do (I have way too many things in play at the moment).

I would really appreciate any help. I really need to get some work done on a project and this is currently blocking me. Thanks in advance!

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,647 questions
0 comments No comments
{count} votes

Accepted answer
  1. Anna Xiu-MSFT 26,151 Reputation points Microsoft Vendor
    2023-02-02T11:13:52.46+00:00

    Hi @moo2u2

    Welcome to Microsoft Q&A! 

    Did you remember what actions you took before this error occurred? 

    Please have a try with the following steps:

    1. Reboot your machine.
    2. Delete the Visual Studio Installer folder. Typically, the folder path is C:\Program Files (x86)\Microsoft Visual Studio\Installer.
    3. Re-download the VS setup file and run the setup file as administrator: https://visualstudio.microsoft.com/downloads/
    4. Try to install Visual Studio installer again. 

    Besides, please go to Windows Update, check for updates, and ensure that all critical and recommended Windows Updates are installed and completed.

    And check if you have anti-virus software or group policy. If so, please temporarily disable them and reboot your computer to try again. 

    You can also temporarily disable installed extensions under Extensions > Manage Extensions > Installed and check if the installed extensions affect or not. 

    Sincerely,

    Anna


    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.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. moo2u2 41 Reputation points
    2023-02-02T22:12:53.9333333+00:00

    Thanks so much! I'm not sure if it was deleting the install folder, or specifically running the installer as admin, but that seems to have done the trick. You're a life saver!!

    0 comments No comments