gpt4 book ai didi

.net - 在不使用命令行安装 Visual Studio 的情况下执行 Visual Studio 单元测试时出错

转载 作者:行者123 更新时间:2023-12-04 18:16:45 26 4
gpt4 key购买 nike

我想在不安装 Visual Studio 的情况下执行 Visual Studio 单元测试。为此,我进行了一些注册表更改,并将所需的 dll 复制到带有 MSTest.exe 文件的文件夹中。但是当我尝试使用命令行“mstest/noisolation/testcontainer:TestProject1.dll”执行测试时,它显示以下错误。

C:\Tools\mstest>mstest /noisolation /testcontainer:TestProject1.dll
Microsoft (R) Test Execution Command Line Tool Version 10.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.

Failed to initialize the unit test extension 'CodedUITestAttribute': Failed to create an instance of the TestClassExtensionAttribute ('Microsoft.VisualStudio.TestTools.UITesting.CodedUITestAttribute, Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a') for the unit test extension 'CodedUITestAttribute': Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
bin\release\prjcco.dll
Unable to load the test container 'bin\release\prjcco.dll' or one of its dependencies. Error details: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

最佳答案

您需要包含 Microsoft.VisualStudio.TestTools.UITesting.dll。

关于.net - 在不使用命令行安装 Visual Studio 的情况下执行 Visual Studio 单元测试时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11504849/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com