问题
I just see 16.4.2 released, but after I upgraded my VS 2019, as soon as I try to open a solution I got error
The 'RoslynPackage' package did not load correctly.
The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by examining the file 'C:\Users\my-user\AppData\Roaming\Microsoft\VisualStudio\16.0_db5aa3ff\ActivityLog.xml'.
Restarting Visual Studio could help resolve this issue.
When I open ActivityLog.xml and scroll to the bottom of the file, I noticed several failures
- 447 ERROR Still unable to load MEF component DLL: Could not load file or assembly 'Microsoft.VisualStudio.CppSvc.Internal, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CodeAnalysis\Microsoft.VisualStudio.CodeAnalysis.VCPlugin.dll Microsoft.VisualStudio.ComponentModelHost.VsShellComponentModelHost 2019/12/23 20:19:25.291
- 448 ERROR Still unable to load MEF component DLL: Could not load file or assembly 'Microsoft.Windows.Simulator.Client, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. c:\program files (x86)\microsoft visual studio\2019\enterprise\common7\ide\commonextensions\platform\diagnosticshub\Microsoft.DiagnosticsHub.VisualStudio.Package.dll Microsoft.VisualStudio.ComponentModelHost.VsShellComponentModelHost 2019/12/23 20:19:25.297
- 449 ERROR Still unable to load MEF component DLL: Could not load file or assembly 'Microsoft.VisualStudio.VC.RecommendationProvider, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\ENTERPRISE\COMMON7\IDE\EXTENSIONS\MICROSOFT\INTELLICODE\IntelliCodeCpp.dll Microsoft.VisualStudio.ComponentModelHost.VsShellComponentModelHost 2019/12/23 20:19:25.297
- 461 ERROR SetSite failed for package [RoslynPackage]Source: 'Microsoft.VisualStudio.Composition' Description: Expected 1 export(s) with contract name "Microsoft.VisualStudio.LanguageServices.VisualStudioWorkspace" but found 0 after applying applicable constraints. Microsoft.VisualStudio.Composition.CompositionFailedException: Expected 1 export(s) with contract name "Microsoft.VisualStudio.LanguageServices.VisualStudioWorkspace" but found 0 after applying applicable constraints.at Microsoft.VisualStudio.Composition.ExportProvider.GetExports(ImportDefinition importDefinition)at Microsoft.VisualStudio.Composition.ExportProvider.GetExports(String contractName, ImportCardinality cardinality, Type type, Type metadataViewType, IMetadataViewProvider& metadataViewProvider)at Microsoft.VisualStudio.Composition.ExportProvider.GetExports[T,TMetadataView](String contractName, ImportCardinality cardinality)at Microsoft.VisualStudio.Composition.ExportProvider.GetExport[T,TMetadataView](String contractName)at Microsoft.VisualStudio.Composition.ExportProvider.GetExport[T](String contractName)at Microsoft.VisualStudio.Composition.ExportProvider.GetExportTat Microsoft.VisualStudio.Composition.ExportProvider.GetExportedValueTat Microsoft.VisualStudio.ComponentModelHost.ComponentModel.GetServiceTat Microsoft.VisualStudio.LanguageServices.Setup.RoslynPackage.d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)at Microsoft.VisualStudio.Shell.AsyncPackage.<>c__DisplayClass20_0.<b__1>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)at Microsoft.VisualStudio.Shell.UIThreadReentrancyScope.WaitOnTaskCompleteInternal(Task task, CancellationToken cancel, Int32 ms)at Microsoft.VisualStudio.Shell.UIThreadReentrancyScope.WaitOnTaskComplete(Task task, CancellationToken cancel, Int32 ms)at Microsoft.VisualStudio.Services.VsTask.<>c__DisplayClass100_1.b__1()at Microsoft.VisualStudio.Services.VsTask.IgnoreObjectDisposedException(Action action)at Microsoft.VisualStudio.Services.VsTask.<>c__DisplayClass100_0.b__0()at Microsoft.VisualStudio.Services.VsTask.<>c__DisplayClass108_0.b__0()at Microsoft.VisualStudio.Services.VsTask.InvokeWithWaitDialog[T](Func`1 function)at Microsoft.VisualStudio.Services.VsTask.InvokeWithWaitDialog(Action action)at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck)at Microsoft.VisualStudio.Services.VsTask.GetResult() {6CF2E545-6109-4730-8883-CF43D7AEC3E1} 80131500 VisualStudio 2019/12/23 20:19:26.481
- 462 ERROR End package load [RoslynPackage] {6CF2E545-6109-4730-8883-CF43D7AEC3E1} 80131500 VisualStudio 2019/12/23 20:19:26.497
来源:https://stackoverflow.com/questions/59461000/visual-studio-2019-16-4-2-crashed-without-being-able-to-open-solutions