I was cleaning up useless files from my disk when I came across the dreaded Temp folder. It had all the extensions used by the Visual Studio installer to add Xamarin functionality to Visual Studio (as I was testing it), as well as probably some older ones (e.g. C++). I searched to find out if deleting them was safe or not and here a Microsoft person said it was OK to remove the .vsix files in that drectory but not anywhere else. So, I proceeded to delete them.
Fast forward a couple days, I opened a solution I wanted to work on and I was presented with errors.
The stack trace (as given from VS itself) is this:
I can't even open VS Installer to repair it, let alone re-installing the installer itself.
VS Installer error info (taken directly from Event Viewer):
I tried uninstalling both from the Programs and Features menu, but it instead told me that it may have already been uninstalled, though the folders are still present. I have also tried Microsoft's InstallCleanup.exe guide, but the executable is nowhere to be found.
I even tried to look at Process Monitor to see what is wrong, but I cannot figure anything out other than a locked file as I'm not that advanced.
Is there any way I can repair Visual Studio, or at least uninstall it and reinstall it?
Fast forward a couple days, I opened a solution I wanted to work on and I was presented with errors.
The stack trace (as given from VS itself) is this:
System.Runtime.InteropServices.COMException : A device attached to the system is not functioning. (Exception from HRESULT: 0x8007001F)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode,IntPtr errorInfo)
at Microsoft.ServiceHub.Utility.Shared.Common.StartProcess(ProcessStartInfo startInfo,EventHandler onExited,EventHandler onDisposed)
at async Microsoft.ServiceHub.Client.HubControllerClient.StartAsync(<Unknown Parameters>)
at async Microsoft.ServiceHub.Client.HubClient.LaunchOrFindControllerAsync(<Unknown Parameters>)
at async Microsoft.ServiceHub.Client.HubClient.GetLocationServiceAsync(<Unknown Parameters>)
at async Microsoft.ServiceHub.Utility.Shared.ServiceHubRetry.ExecuteAsync[TReturnType](<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.ServiceHub.Utility.Shared.ServiceHubRetry.ExecuteAsync[TReturnType](<Unknown Parameters>)
at async Microsoft.ServiceHub.Client.HubClient.GetThisAsRemoteServiceBrokerAsync(<Unknown Parameters>)
at async Microsoft.ServiceHub.Client.HubClient.<Reset>b__54_0(<Unknown Parameters>)
at async Microsoft.VisualStudio.Threading.AsyncLazy`1.<>c__DisplayClass13_0.<GetValueAsync>b__0[T](<Unknown Parameters>)
at async Microsoft.VisualStudio.Threading.ThreadingTools.WithCancellationSlow[T](<Unknown Parameters>)
at async Microsoft.ServiceHub.Client.HubClient.GetPipeAsync(<Unknown Parameters>)
at async Microsoft.ServiceHub.Client.HubClient.RequestServiceAsync(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.Remote.ServiceHubRemoteHostClient.RequestServiceAsync(<Unknown Parameters>)
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
I can't even open VS Installer to repair it, let alone re-installing the installer itself.
VS Installer error info (taken directly from Event Viewer):
Error Information
AppInsightsEvent Name = vs/setup/bootstrapper/error
Description = Generic Error
TelemetrySession = 'c62216e8-62fa-4ff0-878d-52901aed9dc6' Started = True OptIn=True IsInitialized = True Cloned = False
WatsonEventType = VisualStudioNonFatalErrors2
UTC time = 2021-06-04T21:18:15
Exception:
Microsoft.VisualStudio.Setup.Bootstrapper.BootstrapperException
Unable to launch the installer. Error: A device attached to the system is not functioning
Microsoft.VisualStudio.Setup.Bootstrapper.Bootstrapper.StartProcess(String exeDir, String exeName, String args)
Microsoft.VisualStudio.Setup.Bootstrapper.Bootstrapper.ExecuteCore()
Microsoft.VisualStudio.Setup.Bootstrapper.Bootstrapper.<>c__DisplayClass24_0.<Execute>b__0(Object s)
Inner Exception:
System.ComponentModel.Win32Exception
A device attached to the system is not functioning
System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
System.Diagnostics.Process.Start()
System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
Microsoft.VisualStudio.Setup.Bootstrapper.Bootstrapper.StartProcess(String exeDir, String exeName, String args)
WerReportAddDump PID=15648 vs_setup_bootstrapper WerDumpTypeMiniDump
I tried uninstalling both from the Programs and Features menu, but it instead told me that it may have already been uninstalled, though the folders are still present. I have also tried Microsoft's InstallCleanup.exe guide, but the executable is nowhere to be found.
I even tried to look at Process Monitor to see what is wrong, but I cannot figure anything out other than a locked file as I'm not that advanced.
Is there any way I can repair Visual Studio, or at least uninstall it and reinstall it?