VS 2017年的测试资源管理器窗口空引用异常
问题描述:
所以基本上,当我打开我的解决方案与nunit3 & specflow,在2017年VS(15.3.2)硒UI测试中,我得到的测试资源管理器窗口下面的异常和错误:VS 2017年的测试资源管理器窗口空引用异常
有没有办法解决这个问题?有一个工作,但它的可笑...如果我没有任何项目启动VS 2017,然后从最近开放项目 - 它的工作正常。
An exception was encountered while constructing the content of this frame. This information is also logged in "C:\Users\USER\AppData\Roaming\Microsoft\VisualStudio\15.0_6ae63cad\ActivityLog.xml".
Exception details:
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.VisualStudio.TestWindow.VsHost.TestWindowToolWindow.InvokeSwapInRealTestWindow(String eventName)
at Microsoft.VisualStudio.TestWindow.VsHost.TestWindowToolWindow.OnToolWindowCreated()
at Microsoft.VisualStudio.Shell.Package.CreateToolWindow(Type toolWindowType, Int32 id, UInt32 flags)
at Microsoft.VisualStudio.Shell.Package.CreateToolWindow(Type toolWindowType, Int32 id, ProvideToolWindowAttribute tool)
at Microsoft.VisualStudio.Shell.Package.FindToolWindow(Type toolWindowType, Int32 id, Boolean create, ProvideToolWindowAttribute tool)
at Microsoft.VisualStudio.Shell.Package.CreateToolWindow(Guid& toolWindowType, Int32 id)
at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsToolWindowFactory.CreateToolWindow(Guid& toolWindowType, UInt32 id)
at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.ConstructContent()
ActivityLog.xml content:
<entry>
<record>678</record>
<time>2017/09/15 12:43:31.678</time>
<type>Error</type>
<source>VisualStudio</source>
<description>Construction of frame content failed.
Frame identifier: ST:0:0:{e1b7d1f8-9b3c-49b1-8f4f-bfc63a88835d}
Frame caption: Test Explorer
Exception details:
System.NullReferenceException: Object reference not set to an instance of an object.
 at Microsoft.VisualStudio.TestWindow.VsHost.TestWindowToolWindow.InvokeSwapInRealTestWindow(String eventName)
 at Microsoft.VisualStudio.TestWindow.VsHost.TestWindowToolWindow.OnToolWindowCreated()
 at Microsoft.VisualStudio.Shell.Package.CreateToolWindow(Type toolWindowType, Int32 id, UInt32 flags)
 at Microsoft.VisualStudio.Shell.Package.CreateToolWindow(Type toolWindowType, Int32 id, ProvideToolWindowAttribute tool)
 at Microsoft.VisualStudio.Shell.Package.FindToolWindow(Type toolWindowType, Int32 id, Boolean create, ProvideToolWindowAttribute tool)
 at Microsoft.VisualStudio.Shell.Package.CreateToolWindow(Guid& toolWindowType, Int32 id)
 at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsToolWindowFactory.CreateToolWindow(Guid& toolWindowType, UInt32 id)
 at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.ConstructContent()</description>
</entry>
答
如果您的测试浏览器着眼于启动,则会出现此问题。 临时解决方案是在关闭VisualStudio之前单击另一个TAB(解决方案资源管理器),以便在启动时不会将焦点放在TestExplorer上。
+0
仍然不适合我。奇怪的是,我的第二个项目看起来没问题(都使用Selenium和NUnit 3)。 – Rain9333
答
的问题似乎是固定的(至少我不能再重现)与VS2017更新15.4.1
图片的错误信息也没有什么帮助。请张贴实际的文字。请参阅https://meta.*.com/questions/303812/discourage-screenshots-of-code-and-orrors – AdrianHHH
也作为文本添加。 – Rain9333