I have been using Visual Studio 2022 Preview for a while. Then, the stable versions released so I wanted to install VS 2022 Community or Developer edition. However, when I installed the Community edition, I found that Vs launch always gave me an error and solutions were always empty no matter what project I created. I have tried multiple counts of uninstall, reinstall, repair since then but to no avail. I even tried the Developer and Professional editions but same issue occurs with all. I then did clean uninstall of even the SDKs and runtimes, deleted all leftover folders, and then reinstalled everything all over again. Still same issue persists. I m out of my wits right now trying to figure out what exactly is missing here. I have checked all previous Stackoverflow questions on this issue, MSDN forums, reddit and so on. Nothing helped to resolve this.
This is the error mentioned in ActivityLog.xml:
SetSite failed for package [Visual Studio Common IDE Package]Source: 'mscorlib' Description: Retrieving the COM class factory for component with CLSID {177F0C4A-1CD3-4DE7-A32C-71DBBB9FA36D} failed due to the following error: 8007007e The specified module could not be found. (Exception from HRESULT: 0x8007007E). System.IO.FileNotFoundException: Retrieving the COM class factory for component with CLSID {177F0C4A-1CD3-4DE7-A32C-71DBBB9FA36D} failed due to the following error: 8007007e The specified module could not be found. (Exception from HRESULT: 0x8007007E). at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at System.Activator.CreateInstance(Type type) at Microsoft.VisualStudio.CommonIDE.PreviewFeatures.UsePreviewSdk.IsPreviewChannel() at Microsoft.VisualStudio.CommonIDE.PreviewFeatures.UsePreviewSdk.Initialize() at Microsoft.VisualStudio.CommonIDE.BasePackage.<InitializeAsync>d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.CommonIDE.CommonIDEPackage.<InitializeAsync>d__24.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.Shell.AsyncPackage.<>c__DisplayClass21_0.<<Microsoft-VisualStudio-Shell-Interop-IAsyncLoadablePackageInitialize-Initialize>b__1>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e) at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck)<
For this 0x8007007E
error,here are suggestions you can check:
1.What is your Windows version? Please check for updates and install all pending Windows updates.
2.Please check whether you have specialized anti-virus, app-blocker, or GPO phased permission software installed that maybe be blocking this installation. If so, please temporarily disable them.
3.Run the InstallCleanup.exe tool to remove installation files and product information for all installed instances. Then install visual studio 2022 again.
In addition, if your issue persists, you can collect setup log files generated during installation and check the error messages in dd_installer_xxx
/dd_setup_xxx
files or share the error messages.
1 download Microsoft Visual Studio and .NET Framework log collection tool
2 run Collect.exe in an administrative command prompt The tool generates a vslogs.zip file in your %TEMP% folder, typically at C:\Users\YourName\AppData\Local\Temp\vslogs.zip.
For more information, please refer to:Troubleshoot installation or upgrades - Visual Studio (Windows)
Hope it can help you.