My newly installed Visual studio poped up a dialog box with the message of
An exception has been encountered. This may be caused by an extension.
You can get more information by examining the file 'C:\\Users....\\AppData\\Roaming\\Microsoft\\VisualStudio\\14.0\\ActivityLog.xml'.
And I found the following errors in the xml file.
A MEF Component threw an exception at runtime: Microsoft.VisualStudio.Composition.CompositionFailedException: An exception was thrown while initializing part "Microsoft.VisualStudio.IntelliTrace.SourceControl.HistoricalModeHint.HistoricalModeTaggerProvider". ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Diagnostics.Utilities, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. at Microsoft.VisualStudio.IntelliTrace.SourceControl.HistoricalModeHint.HistoricalModeTaggerProvider..ctor(SVsServiceProvider serviceProvider, IVsEditorAdaptersFactoryService adapterFactory) --- End of inner exception stack trace --- at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.CreateValue() at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.Create() at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState) at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState) at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose() at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.b__0()
and
Microsoft.VisualStudio.Composition.CompositionFailedException: An exception was thrown while initializing part "Microsoft.VisualStudio.IntelliTrace.SourceControl.HistoricalModeHint.HistoricalModeTaggerProvider". ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Diagnostics.Utilities, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. at Microsoft.VisualStudio.IntelliTrace.SourceControl.HistoricalModeHint.HistoricalModeTaggerProvider..ctor(SVsServiceProvider serviceProvider, IVsEditorAdaptersFactoryService adapterFactory) --- End of inner exception stack trace --- at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.CreateValue() at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.Create() at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState) at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState) at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose() at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.b__0() --- End of stack trace from previous location where exception was thrown --- at Microsoft.VisualStudio. Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.b__0() at Microsoft.VisualStudio.Composition.DelegateServices.<>c__DisplayClass2_0
1.<As>b__0() at System.Lazy
1.CreateValue() at System.Lazy1.LazyInitValue() at System.Lazy
1.get_Value() at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GatherTaggers(ITextBuffer textBuffer)
I tried to repair VS but it doesn't help. I also tried to force the cache to be rebuilt:
Try to run the VS with safe mode using the command: devenv /safemode , if it works fine, that means the installed extensions caused this issue, you can go to Tools—Extensions and Updates and click 'Updates' tab and install all updates, then reopen VS. Or click 'Installed' tab and remove/uninstall the installed extensions one by one to find the culprit.
Another thing you can try is to run visual studio as administrator, it can help us to excludes the permission issue.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.