Reputation: 1703
I'm using VS2015 professional with resharper ultimate and I've started to get the following error in the unit test session window when I'm executing my unit tests.
2016.09.21 14:16:54.745 ERROR System.AggregateException: One or more errors occurred. ---> System.Threading.Tasks.TaskCanceledException: A task was canceled. --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at JetBrains.ReSharper.UnitTestFramework.Launch.Stages.DiscoveryStage.Run(CancellationToken token) at JetBrains.ReSharper.UnitTestFramework.Launch.UnitTestLaunch.RunStage(Object stageObject) ---> (Inner Exception #0) System.Threading.Tasks.TaskCanceledException: A task was canceled.<---
tests of other projects works perfectly in VS2013 but not in VS2015. Yesterday I've installed couple of packages on my pc: vs14-kb3165756.exe and OpenCover.UI.vsix
I've tried to uninstall the OpenCover package which didn't solved the issue.
Upvotes: 9
Views: 3991
Reputation: 23108
This is most probably related katit
's answer, but it also happens when the configuration is in Debug Mode, but a deployment using Release version is performed.
Runner fails to run after a deployment (Release) is performed, probably because it tries to run using the latest build output which is composed of Release assemblies (optimized), so a full rebuild with Debug configuration must be performed.
Upvotes: 1
Reputation: 5283
For anyone experiencing this issue, after re-adding a UWP Unit Test project multiple times, I found that after I created the new Unit Test Project (Universal Windows), in the Solution's Configuration Manager, for some reason the Build CheckBox was unchecked, and when I checked it, and ran my unit tests, all was executing as expected.
Right Click Solution > Configuration Manager...
Upvotes: 7
Reputation: 17915
I just had same issue, in my case solution configuration was set to "Release". Make sure all your project set to "Debug" and re-try. Worked for me
Upvotes: 4