Visual Studio 2013无法打开测试窗口

 mobiledu2502927877 发布于 2023-02-13 17:24

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

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根本无法运行测试.关闭重新打开测试窗口会显示相同的错误.

1 个回答
  • 这似乎是由组件模型缓存中的损坏引起的.

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

    %LOCALAPPDATA%\微软\ VisualStudio的\ 12.0\ComponentModelCache

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

    2023-02-13 17:26 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有