Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The MSTest tool doesn't pick up the mstest.exe from Visual Studio 2019 #2618

fruffin opened this issue Sep 4, 2019 · 1 comment · Fixed by #2619


Copy link

commented Sep 4, 2019

What You Are Seeing?

I run the unit tests like this:

MSTest("./src/**/bin/" + configuration + "/*.Tests.dll");

I get the following error when running the build script:

An error occurred when executing task 'Run-Unit-Tests'.
Error: MSTest: Could not locate executable.

This is the exact same issue as #1522 but for Visual Studio 2019

What is Expected?

I expect my unit tests to run.

What version of Cake are you using?


Are you running on a 32 or 64 bit system?

64 bit

What environment are you running on? Windows? Linux? Mac?

Windows Server 2019

Are you running on a CI Server? If so, which one?


How Did You Get This To Happen? (Steps to Reproduce)

Run a build with unit tests on a machine with only Visual Studio 2019 (any edition).

Output Log

[20:28:02]Cake.exe : An error occurred when executing task 'TestMSTest'.
[20:28:02]At D:\TeamCity\Data\work\f76d03f99a76a2b1\Samples\Packages\Build.Scripts.3.0.3\tools\cake.psm1:275 char:5
[20:28:02]+     &$CAKE_EXE $cakeArguments
[20:28:02]+     ~~~~~~~~~~~~~~~~~~~~~~~~~
[20:28:02]    + CategoryInfo          : NotSpecified: (An error occurr...k 'TestMSTest'.:String) [], RemoteException
[20:28:02]    + FullyQualifiedErrorId : NativeCommandError
[20:28:02]One or more errors occurred.
[20:28:02]MSTest: Could not locate executable.

This comment has been minimized.

Copy link
Contributor Author

commented Sep 4, 2019

Pull request coming shortly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.