How to fix “Internal Diagnostics Hub Exception” in VS 2015 Update 1?

前端 未结 7 947
南笙
南笙 2020-12-01 16:04

I\'ve just updated to Visual Studio 2015 Update 1, and I\'m getting the error whenever I start debugging:

Internal Diagnostics Hub Exception. See log

7条回答
  •  青春惊慌失措
    2020-12-01 16:18

    I dug into the the Visual Studio logs to understand what was happening (C:\Users\YourUser\AppData\Roaming\Microsoft\VisualStudio\14.0\ActivityLog.xml). In mine, the messages were something like this:

      
        846
        
        Information
        VisualStudio
        Entering function CVsPackageInfo::HrInstantiatePackage
        {2FFE45C4-5C73-493C-B187-F2E955FF875E}
      
      
        847
        
        Information
        VisualStudio
        Begin package load [Microsoft.VisualStudio.LanguageServices.TypeScript.TypeScriptPackage, Microsoft.VisualStudio.LanguageServices.TypeScript, Version=14.0.0.0, Culture=neutral]
        {2FFE45C4-5C73-493C-B187-F2E955FF875E}
      
      
        848
        
        Error
        VisualStudio
        LegacySitePackage failed for package [Microsoft.VisualStudio.LanguageServices.TypeScript.TypeScriptPackage, Microsoft.VisualStudio.LanguageServices.TypeScript, Version=14.0.0.0, Culture=neutral]Source: 'Microsoft.VisualStudio.Composition' Description: An exception was thrown while initializing part "Microsoft.CodeAnalysis.Editor.TypeScript.ScriptContexts.TypeScriptProjectProvider".
    Microsoft.VisualStudio.Composition.CompositionFailedException: An exception was thrown while initializing part "Microsoft.CodeAnalysis.Editor.TypeScript.ScriptContexts.TypeScriptProjectProvider". ---> System.IO.IOException: Error while reading file: 'typescriptServices.js' from location: 'C:\Users\YourUser\AppData\Local\assembly\dl3\VGMMC3GX.G57\8WMQ7NH1.KPN\ffb2b475\00c96cd3_2ec7d101'. ---> System.IO.FileNotFoundException: Could not find file 'C:\Users\YourUser\AppData\Local\assembly\dl3\VGMMC3GX.G57\8WMQ7NH1.KPN\ffb2b475\00c96cd3_2ec7d101\typescriptServices.js'.
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
       at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
       at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
       at System.IO.File.ReadAllText(String path)
       at Microsoft.CodeAnalysis.Editor.TypeScript.ScriptServices.FileHelpers.ReadFile(String filePath)
       --- End of inner exception stack trace ---
       at Microsoft.CodeAnalysis.Editor.TypeScript.ScriptServices.FileHelpers.ReadFile(String filePath)
       at Microsoft.CodeAnalysis.Editor.TypeScript.ScriptServices.FileHelpers.GetToolsVersionFromFile(IUserSettingsProvider userSettingsProvider)
       at Microsoft.CodeAnalysis.Editor.TypeScript.ScriptContexts.TypeScriptProjectProvider..ctor(SVsServiceProvider serviceProvider, ScriptIdFactory scriptIdFactory, IUserSettingsProvider userSettingsProvider, IProjectCompilationSettingsProvider projectCompilationSettingsProvider)
    --- End of stack trace from previous location where exception was thrown ---
       at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
       --- 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.<GetExportedValueHelper>b__0()
       at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportElement(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import, RuntimeExport export, Func`3 lazyFactory)
       at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportSite(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import)
       at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.<CreateValue>b__10_0(RuntimeImport import)
       at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
       at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
       at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
       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.ExportProvider.<>c__DisplayClass53_0.<CreateExport>b__0()
       at System.Lazy`1.CreateValue()
       at System.Lazy`1.LazyInitValue()
       at System.Lazy`1.get_Value()
       at Microsoft.VisualStudio.Composition.NetFxAdapters.MefV1ExportProvider.<>c__DisplayClass12_0.<UnwrapExport>b__1()
       at System.ComponentModel.Composition.Primitives.Export.GetExportedValueCore()
       at System.ComponentModel.Composition.Primitives.Export.get_Value()
       at System.ComponentModel.Composition.ExportServices.GetCastedExportedValue[T](Export export)
       at System.ComponentModel.Composition.ExportServices.<>c__DisplayClass12_0`1.<CreateStronglyTypedLazyOfT>b__1()
       at System.Lazy`1.CreateValue()
       at System.Lazy`1.LazyInitValue()
       at System.Lazy`1.get_Value()
       at Microsoft.VisualStudio.LanguageServices.TypeScript.TypeScriptPackage.SetupGlobalCommandHandlers()
       at Microsoft.VisualStudio.LanguageServices.TypeScript.TypeScriptPackage.Initialize()
       at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)
    --- End of stack trace from previous location where exception was thrown ---
       at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState)
       at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose()
       at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass53_0.<CreateExport>b__0()
       at System.Lazy`1.CreateValue()
       at System.Lazy`1.LazyInitValue()
       at System.Lazy`1.get_Value()
       at Microsoft.VisualStudio.Composition.NetFxAdapters.MefV1ExportProvider.<>c__DisplayClass12_0.<UnwrapExport>b__1()
       at System.ComponentModel.Composition.Primitives.Export.GetExportedValueCore()
       at System.ComponentModel.Composition.Primitives.Export.get_Value()
       at System.ComponentModel.Composition.ExportServices.GetCastedExportedValue[T](Export export)
       at System.ComponentModel.Composition.ExportServices.<>c__DisplayClass12_0`1.<CreateStronglyTypedLazyOfT>b__1()
       at System.Lazy`1.CreateValue()
       at System.Lazy`1.LazyInitValue()
       at System.Lazy`1.get_Value()
       at Microsoft.VisualStudio.LanguageServices.TypeScript.TypeScriptPackage.SetupGlobalCommandHandlers()
       at Microsoft.VisualStudio.LanguageServices.TypeScript.TypeScriptPackage.Initialize()
       at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)
    --- End of stack trace from previous location where exception was thrown ---
       at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState)
       at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose()
       at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass53_0.<CreateExport>b__0()
       at System.Lazy`1.CreateValue()
       at System.Lazy`1.LazyInitValue()
       at System.Lazy`1.get_Value()
       at Microsoft.VisualStudio.Composition.NetFxAdapters.MefV1ExportProvider.<>c__DisplayClass12_0.<UnwrapExport>b__1()
       at System.ComponentModel.Composition.Primitives.Export.GetExportedValueCore()
       at System.ComponentModel.Composition.Primitives.Export.get_Value()
       at System.ComponentModel.Composition.ExportServices.GetCastedExportedValue[T](Export export)
       at System.ComponentModel.Composition.ExportServices.<>c__DisplayClass12_0`1.<CreateStronglyTypedLazyOfT>b__1()
       at System.Lazy`1.CreateValue()
       at System.Lazy`1.LazyInitValue()
       at System.Lazy`1.get_Value()
       at Microsoft.VisualStudio.LanguageServices.TypeScript.TypeScriptPackage.SetupGlobalCommandHandlers()
       at Microsoft.VisualStudio.LanguageServices.TypeScript.TypeScriptPackage.Initialize()
       at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)
    --- End of stack trace from previous location where exception was thrown ---
       at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState)
       at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose()
       at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass53_0.<CreateExport>b__0()
       at System.Lazy`1.CreateValue()
       at System.Lazy`1.LazyInitValue()
       at System.Lazy`1.get_Value()
       at Microsoft.VisualStudio.Composition.NetFxAdapters.MefV1ExportProvider.<>c__DisplayClass12_0.<UnwrapExport>b__1()
       at System.ComponentModel.Composition.Primitives.Export.GetExportedValueCore()
       at System.ComponentModel.Composition.Primitives.Export.get_Value()
       at System.ComponentModel.Composition.ExportServices.GetCastedExportedValue[T](Export export)
       at System.ComponentModel.Composition.ExportServices.<>c__DisplayClass12_0`1.<CreateStronglyTypedLazyOfT>b__1()
       at System.Lazy`1.CreateValue()
       at System.Lazy`1.LazyInitValue()
       at System.Lazy`1.get_Value()
       at Microsoft.VisualStudio.LanguageServices.TypeScript.TypeScriptPackage.SetupGlobalCommandHandlers()
       at Microsoft.VisualStudio.LanguageServices.TypeScript.TypeScriptPackage.Initialize()
       at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)System.IO.IOException: Error while reading file: 'typescriptServices.js' from location: 'C:\Users\YourUser\AppData\Local\assembly\dl3\VGMMC3GX.G57\8WMQ7NH1.KPN\ffb2b475\00c96cd3_2ec7d101'. ---> System.IO.FileNotFoundException: Could not find file 'C:\Users\YourUser\AppData\Local\assembly\dl3\VGMMC3GX.G57\8WMQ7NH1.KPN\ffb2b475\00c96cd3_2ec7d101\typescriptServices.js'.
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
       at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
       at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
       at System.IO.File.ReadAllText(String path)
       at Microsoft.CodeAnalysis.Editor.TypeScript.ScriptServices.FileHelpers.ReadFile(String filePath)
       --- End of inner exception stack trace ---
       at Microsoft.CodeAnalysis.Editor.TypeScript.ScriptServices.FileHelpers.ReadFile(String filePath)
       at Microsoft.CodeAnalysis.Editor.TypeScript.ScriptServices.FileHelpers.GetToolsVersionFromFile(IUserSettingsProvider userSettingsProvider)
       at Microsoft.CodeAnalysis.Editor.TypeScript.ScriptContexts.TypeScriptProjectProvider..ctor(SVsServiceProvider serviceProvider, ScriptIdFactory scriptIdFactory, IUserSettingsProvider userSettingsProvider, IProjectCompilationSettingsProvider projectCompilationSettingsProvider)
    --- End of stack trace from previous location where exception was thrown ---
       at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)System.IO.FileNotFoundException: Could not find file 'C:\Users\YourUser\AppData\Local\assembly\dl3\VGMMC3GX.G57\8WMQ7NH1.KPN\ffb2b475\00c96cd3_2ec7d101\typescriptServices.js'.
    File name: 'C:\Users\YourUser\AppData\Local\assembly\dl3\VGMMC3GX.G57\8WMQ7NH1.KPN\ffb2b475\00c96cd3_2ec7d101\typescriptServices.js'
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
       at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
       at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
       at System.IO.File.ReadAllText(String path)
       at Microsoft.CodeAnalysis.Editor.TypeScript.ScriptServices.FileHelpers.ReadFile(String filePath)
        {2FFE45C4-5C73-493C-B187-F2E955FF875E}
        
    80131500
    849 Error VisualStudio SetSite failed for package [Microsoft.VisualStudio.LanguageServices.TypeScript.TypeScriptPackage, Microsoft.VisualStudio.LanguageServices.TypeScript, Version=14.0.0.0, Culture=neutral](null) {2FFE45C4-5C73-493C-B187-F2E955FF875E}
    80131500
    850 Error VisualStudio End package load [Microsoft.VisualStudio.LanguageServices.TypeScript.TypeScriptPackage, Microsoft.VisualStudio.LanguageServices.TypeScript, Version=14.0.0.0, Culture=neutral] {2FFE45C4-5C73-493C-B187-F2E955FF875E}
    80131500

    And then, I realized that TypeScript support should be broken.

    Just installing TypeScript for Visual Studio 2015, closing Visual Studio and then opening your project again will solve your problem. The message will disappear.

提交回复
热议问题