我刚刚更新到Visual Studio 2015 Update 1,每当我开始调试时,我都会收到错误:
内部诊断中心例外。有关详细信息,请参阅日志。
如何解决此问题,或禁用错误?
我不知道应该检查哪个日志文件。在ActivityLog.xml
中,最后一个条目是昨天的,因此不包含任何有用的内容。接下来,我知道有一个MEF(Microsoft.VisualStudio.Default.err
)的日志文件,但那是空的。如何调查这个?
答案 0 :(得分:12)
我深入研究Visual Studio日志以了解发生了什么(C:\Users\YourUser\AppData\Roaming\Microsoft\VisualStudio\14.0\ActivityLog.xml
)。在我的,消息是这样的:
<entry>
<record>846</record>
<time>2016/07/22 01:07:20.351</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Entering function CVsPackageInfo::HrInstantiatePackage</description>
<guid>{2FFE45C4-5C73-493C-B187-F2E955FF875E}</guid>
</entry>
<entry>
<record>847</record>
<time>2016/07/22 01:07:20.367</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Begin package load [Microsoft.VisualStudio.LanguageServices.TypeScript.TypeScriptPackage, Microsoft.VisualStudio.LanguageServices.TypeScript, Version=14.0.0.0, Culture=neutral]</description>
<guid>{2FFE45C4-5C73-493C-B187-F2E955FF875E}</guid>
</entry>
<entry>
<record>848</record>
<time>2016/07/22 01:07:20.374</time>
<type>Error</type>
<source>VisualStudio</source>
<description>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)</description>
<guid>{2FFE45C4-5C73-493C-B187-F2E955FF875E}</guid>
<hr>80131500</hr>
<errorinfo></errorinfo>
</entry>
<entry>
<record>849</record>
<time>2016/07/22 01:07:21.945</time>
<type>Error</type>
<source>VisualStudio</source>
<description>SetSite failed for package [Microsoft.VisualStudio.LanguageServices.TypeScript.TypeScriptPackage, Microsoft.VisualStudio.LanguageServices.TypeScript, Version=14.0.0.0, Culture=neutral](null)</description>
<guid>{2FFE45C4-5C73-493C-B187-F2E955FF875E}</guid>
<hr>80131500</hr>
<errorinfo></errorinfo>
</entry>
<entry>
<record>850</record>
<time>2016/07/22 01:07:21.951</time>
<type>Error</type>
<source>VisualStudio</source>
<description>End package load [Microsoft.VisualStudio.LanguageServices.TypeScript.TypeScriptPackage, Microsoft.VisualStudio.LanguageServices.TypeScript, Version=14.0.0.0, Culture=neutral]</description>
<guid>{2FFE45C4-5C73-493C-B187-F2E955FF875E}</guid>
<hr>80131500</hr>
<errorinfo></errorinfo>
</entry>
然后,我意识到应该打破TypeScript支持。
只需installing TypeScript for Visual Studio 2015,关闭Visual Studio然后再次打开项目将解决您的问题。消息将消失。
答案 1 :(得分:9)
要启用诊断工具的日志,请添加以下注册表项
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\DiagnosticsHub\LogLevel
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\DiagnosticsHub\LogDirectory
对于LogLevel,您可以使用以下字符串之一&#34; All&#34;,&#34; Info&#34;,&#34; Debug&#34;,&#34; Warning&#34;,& #34;错误&#34; (在你的情况下,我会使用All来更好地了解正在发生的事情)。对于LogDirectory,它是您选择的目录&#34; C:\ Logs&#34;。完成后,不要忘记删除这些密钥,因为诊断工具日志记录非常耗费系统。
我们尝试仅在意外情况下提示消息框(正常错误仅在工具窗口中显示为错误而从未通过消息框显示),因此这听起来像第三方应用程序的问题或一些奇怪的升级问题。你应该能够搜索&#34;错误---&#34;在日志中,看看根本原因是什么。随意在这里发布错误或PM我,我很乐意提供帮助(注意:我在诊断工具团队工作)
欢迎在https://connect.microsoft.com/发布问题 在那里收到的每个问题都会变成一个错误并分配给相应的团队。
答案 2 :(得分:7)
这对我有用:
受到这篇文章的启发:
答案 3 :(得分:4)
PerformanceDebuggerSwimLanesView.html
中缺少c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Platform\DiagnosticsHub\WebViews\
个文件。从同事复制文件后,错误得到修复;)
我已将文件放在gist中,以防您需要。
答案 4 :(得分:0)
我的一个安装也遇到了同样的问题(从Update 1
升级到Update 2 RC
位的干净ISO安装工作)。应该注意我的安装也缺少ScriptedHost.dll程序集,我必须从工作系统手动复制:\
Debug --- ApplicationPathService --- Hub application path is 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Platform\DiagnosticsHub'
Debug --- Scripted Control (PerformanceDebuggerSwimLanesView.manifest.json) --- Initializing the ScriptedControl with manifest file 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Platform\DiagnosticsHub\WebViews\PerformanceDebuggerSwimLanesView.manifest.json'. Base directory 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions'
Debug --- Scripted Control (PerformanceDebuggerSwimLanesView.manifest.json) --- Menu command service is provided for manifest 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Platform\DiagnosticsHub\WebViews\PerformanceDebuggerSwimLanesView.manifest.json'.
Debug --- Document ('C:\Users\Jason\AppData\Local\Temp\Report20160308-1527.diagsession') --- Graph Update data packet 1 sent (size: 1073)
Debug --- DataWarehouseInstance --- Request b1684120-6375-4091-a745-1c3d2aa2aa16: 'GraphUpdates' request to datawarehouse
Error --- Scripted Control (PerformanceDebuggerSwimLanesView.manifest.json) --- Microsoft.DiagnosticsHub.Diagnostics.InternalHubException: ScriptedSandbox terminated during control initialization.
at Microsoft.DiagnosticsHub.VisualStudio.Presentation.Controls.VisualStudioScriptedControl.ScriptedControlOnTerminated(Object sender, EventArgs eventArgs)
at Microsoft.VisualStudio.ScriptedHost.ScriptedControl.add_Terminated(EventHandler`1 value)
at Microsoft.DiagnosticsHub.VisualStudio.Presentation.Controls.VisualStudioScriptedControl.Initialize(IScriptedControlConfiguration scriptedControlConfiguration)
Error --- Service Microsoft.DiagnosticsHub.Presentation.Controls.ISwimLanesViewService implementation --- Could not create IScriptedControl.
Error --- DispatcherProvider --- Unhandled exception on DispatcherProvider.Invoke
Microsoft.DiagnosticsHub.Diagnostics.InternalHubException: Internal Diagnostics Hub Exception. See log for more details.
at Microsoft.DiagnosticsHub.VisualStudio.Presentation.Controls.SwimLanesViewService.CreateControl(ViewDestinations viewDestinations, IEnumerable`1 swimLaneConfigurations)
at Microsoft.DiagnosticsHub.Presentation.ViewModels.CustomViewsViewModel.OnActivated()
at Microsoft.DiagnosticsHub.Presentation.ViewModels.PerformanceDebuggerDocumentViewModel.<>c__DisplayClass21_0.<UpdateViewBasedOnSessionState>b__1()
at Microsoft.DiagnosticsHub.Presentation.DispatcherProvider.<>c__DisplayClass5_0.<Invoke>b__0()
答案 5 :(得分:0)
启用其他答案中描述的日志记录并看到此错误:
https://login.microsoftonline.com/common/oauth2/v2.0/token
但文件C:\Users\<user>\AppData\Local\assembly\dl3\EGKO838X.JT9\LMBXB9JW.4DO\4eeaf665\00d85bfc_f9cad101\WebViews\PerformanceDebuggerSwimLanesView.manifest.json' not found.
存在于PerformanceDebuggerSwimLanesView.manifest.json
中。解决方案是以管理员身份运行Visual Studio,不再需要内部诊断中心异常。
答案 6 :(得分:-1)
我发现此错误的原因不同。
在调试期间,Visual Studio Professional 2015 SP 3中显示了相同的消息。
在Microsoft上记录了这个错误: https://connect.microsoft.com/VisualStudio/feedback/details/3106402