Visual Studio 2013无法打开测试窗口

编程入门 行业动态 更新时间:2024-10-25 16:20:58
本文介绍了Visual Studio 2013无法打开测试窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

当我打开Visual Studio 2013并加载我的解决方案时,我收到一条错误消息,告诉我测试窗口"无法加载,我对此表示欢迎.

When I open Visual Studio 2013 and load my solution I'm greeted by an error message telling me the Test Window is unable to load.

The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information. 1) Cannot compose part 'Microsoft.VisualStudio.TestWindow.Controller.TestsServiceInternal' because a cycle exists in the dependencies between the exports being composed. To break this cycle, consider changing some imports from constructor to property injection. Element: Microsoft.VisualStudio.TestWindow.Controller.TestsServiceInternal --> Microsoft.VisualStudio.TestWindow.Controller.TestsServiceInternal Resulting in: Cannot get export 'Microsoft.VisualStudio.TestWindow.Controller.TestsServiceInternal (ContractName="Microsoft.VisualStudio.TestWindow.Data.TestsService+ITestsServiceInternal")' from part 'Microsoft.VisualStudio.TestWindow.Controller.TestsServiceInternal'. Element: Microsoft.VisualStudio.TestWindow.Controller.TestsServiceInternal (ContractName="Microsoft.VisualStudio.TestWindow.Data.TestsService+ITestsServiceInternal") --> Microsoft.VisualStudio.TestWindow.Controller.TestsServiceInternal The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information. 1) An operation is not legal in the current state. (Exception from HRESULT: 0x80131509) Resulting in: An exception occurred while trying to create an instance of type 'Microsoft.VisualStudio.TestWindow.VsHost.TestWindowHost'. Resulting in: Cannot activate part 'Microsoft.VisualStudio.TestWindow.VsHost.TestWindowHost'. Element: Microsoft.VisualStudio.TestWindow.VsHost.TestWindowHost --> Microsoft.VisualStudio.TestWindow.VsHost.TestWindowHost Resulting in: Cannot get export 'Microsoft.VisualStudio.TestWindow.VsHost.TestWindowHost (ContractName="Microsoft.VisualStudio.TestWindow.Controller.IOpenResult")' from part 'Microsoft.VisualStudio.TestWindow.VsHost.TestWindowHost'. Element: Microsoft.VisualStudio.TestWindow.VsHost.TestWindowHost (ContractName="Microsoft.VisualStudio.TestWindow.Controller.IOpenResult") --> Microsoft.VisualStudio.TestWindow.VsHost.TestWindowHost Resulting in: Cannot set import 'Microsoft.VisualStudio.TestWindow.Controller.TestsServiceInternal..ctor (Parameter="openResult", ContractName="Microsoft.VisualStudio.TestWindow.Controller.IOpenResult")' on part 'Microsoft.VisualStudio.TestWindow.Controller.TestsServiceInternal'. Element: Microsoft.VisualStudio.TestWindow.Controller.TestsServiceInternal..ctor (Parameter="openResult", ContractName="Microsoft.VisualStudio.TestWindow.Controller.IOpenResult") --> Microsoft.VisualStudio.TestWindow.Controller.TestsServiceInternal Resulting in: Cannot get export 'Microsoft.VisualStudio.TestWindow.Controller.TestsServiceInternal (ContractName="Microsoft.VisualStudio.TestWindow.Data.TestsService+ITestsServiceInternal")' from part 'Microsoft.VisualStudio.TestWindow.Controller.TestsServiceInternal'. Element: Microsoft.VisualStudio.TestWindow.Controller.TestsServiceInternal (ContractName="Microsoft.VisualStudio.TestWindow.Data.TestsService+ITestsServiceInternal") --> Microsoft.VisualStudio.TestWindow.Controller.TestsServiceInternal

Visual Studio完全无法运行测试.关闭重新打开测试窗口会显示相同的错误.

Visual Studio is unable to run tests at all. Closing an re-opening the test window shows the same error.

推荐答案

这似乎是由组件模型缓存中的损坏引起的.

This seems to be caused by a corruption in the Component Model Cache.

关闭Visual Studio的所有实例,然后导航到文件夹并将其删除.

Close all instances of Visual Studio, then navigate to folder and delete it.

%LOCALAPPDATA%\ Microsoft \ VisualStudio \ 12.0 \ ComponentModelCache

%LOCALAPPDATA%\Microsoft\VisualStudio\12.0\ComponentModelCache

现在重新启动Visual Studio,它应该可以再次工作.

Now restart Visual Studio and it should work again.

更多推荐

Visual Studio 2013无法打开测试窗口

本文发布于:2023-11-03 14:42:45,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1555392.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:无法打开   窗口   测试   Visual   Studio

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!