I want to use mstest.exe to run my unit test on build server, but I don't want to install Visual Studio on the build server. Can I just install MSTest without Visual Studio?
相关问题
- How to know full paths to DLL's from .csproj f
- Importing NuGet references through a local project
- Visual Studio 2019 - error MSB8020: The build tool
- 'System.Threading.ThreadAbortException' in
- VS2017 RC - The following error occurred when tryi
相关文章
- How to show location of errors, references to memb
- Log4Net Multiple Projects
- How to track MongoDB requests from a console appli
- Visual Studio Hangs on Loading UI Library
- How to use Mercurial from Visual Studio 2010?
- Attribute filter syntax for code coverage in TeamC
- Copy different file to output directory for releas
- How to replace Middleware in integration tests pro
MSTest was announced for .NET Core users. The announcement has usage example with the
dotnet
tool. I haven't figured myself how to get the standalonemstest
executable.I just got this working on my servers without installing the Visual Studio 2017 IDE. My requirement was
I had to do a combination of a few things stated in other answers and then also another one here.
VS2017:
Step 3 was to fix the following issue:
"Could not resolve this reference. Could not locate the assembly "Microsoft.VisualStudio.QualityTools.UnitTestFramework""
Which then caused:
"error CS0234: The type or namespace name 'VisualStudio' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) "
I did not have to add any references to the project. However, the path to the vstest.console.exe is contained in the TestAgent folder (for me it was "C:\Program Files (x86)\Microsoft Visual Studio\2017\TestAgent\Common7\IDE\CommonExtensions\Microsoft\TestWindow")