Reputation: 51
I want to execute visual studio unit tests without installing visual studio . To achieve this , I made some registry changes and copied the dll's required in a folder with MSTest.exe file . But when I try to execute the test using a command line "mstest /noisolation /testcontainer:TestProject1.dll" it showing the below error.
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.
Upvotes: 2
Views: 3370
Reputation: 888213
You need to include Microsoft.VisualStudio.TestTools.UITesting.dll.
Upvotes: 4