提交 ae88c900 编写于 作者: H Heejae Chang

fail fast when extension manager is null

made us to crash right away when extension manager is null to get better info on the situation.

if extension manager is null, vs is seriously broken.

fix https://devdiv.visualstudio.com/DevDiv/_workitems?path=Assigned%20to%20me&_a=query
上级 45c60ede
......@@ -43,6 +43,12 @@ public VisualStudioWorkspaceDiagnosticAnalyzerProviderService(VisualStudioWorksp
// Get the analyzer assets for installed VSIX extensions through the VSIX extension manager.
var extensionManager = workspace.GetVsService(assembly.GetType("Microsoft.VisualStudio.ExtensionManager.SVsExtensionManager"));
if (extensionManager == null)
{
// extension manager can't be null. if it is null, then VS is seriously broken.
// fail fast right away
FailFast.OnFatalException(new Exception("extension manager can't be null"));
}
_hostDiagnosticAnalyzerInfo = GetHostAnalyzerPackagesWithName(extensionManager, assembly.GetType("Microsoft.VisualStudio.ExtensionManager.IExtensionContent"));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册