Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

MStest doesn't execute unit tests when OutputPath of the project changes
theateist
#1 Posted : Saturday, November 5, 2022 12:31:37 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 11/5/2022(UTC)
Posts: 1
Location: United States of America

When I change the OutputPath for my unit test project the tests are still discoverable in Test Explorer, but when I try to run them (right-click -> Run) they don't run and I get the error below in Output window. Why it suddenly doesn't find that dll?

Code:
 Building Test Projects
    Starting test discovery for requested test run
    ========== Starting test discovery ==========
    Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Testhost process exited with error: Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.TestPlatform.CoreUtilities, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
    File name: 'Microsoft.TestPlatform.CoreUtilities, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
       at Microsoft.VisualStudio.TestPlatform.TestHost.Program.Main(String[] args)
    . Please check the diagnostic logs for more information.
       at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.ThrowOnTestHostExited(Boolean testHostExited)
       at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources, String runSettings)
       at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyDiscoveryManager.DiscoverTests(DiscoveryCriteria discoveryCriteria, ITestDiscoveryEventsHandler2 eventHandler)
    ========== Test discovery aborted: 0 Tests found in 859.1 ms ==========
    ========== Starting test run ==========
    ========== Test run finished: 0 Tests (0 Passed, 0 Failed, 0 Skipped) run in < 1 ms ==========


The bin folder in the new OutputPath location seems to have all files that would have been in the bin folder inside the project folder if I haven't changed the OutputPath.

I use MStest from Visual Studio 2022.

What am I missing here?

[![enter image description here][1]][1]



[1]: https://i.stack.imgur.com/Y9BgB.png
Remco
#2 Posted : Saturday, November 5, 2022 10:03:09 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,667

Thanks: 877 times
Was thanked: 1191 time(s) in 1111 post(s)
Hi, thanks for posting.

NCrunch doesn't integrate with Test Explorer or use Visual Studio's MSTest adapters. The problem you're experiencing here is with Visual Studio, not NCrunch. I recommend running your tests using NCrunch's Tests Window instead (as this is where you'll see the benefits of the software).
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.026 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download