getting an exception on RunSelectedOperation with VS 2022 17.5.0
See original GitHub issueDescribe the bug
The unit tests do not run any more and need to restart Visual Studio.
Steps To Reproduce
There is not clear way to reproduce the issue. I have the feeling it is a combination of changing branches under git AND switching between Debug, Release and other configurtion
Expected behavior
I should be able to run unit test.
Actual behavior
[2/22/2023 4:41:54.234 PM] Hierarchy Collapsing node 178747
[2/22/2023 4:41:54.299 PM] Hierarchy Collapsing node 178747
[2/22/2023 4:41:58.026 PM] Interrupt: Enqueueing RunSelectedOperation
[2/22/2023 4:41:58.026 PM] Enqueue operation 'RunSelectedOperation', hashcode:53842738
[2/22/2023 4:41:58.026 PM] Operation left in the the queue: 1
[2/22/2023 4:41:58.026 PM] 'RunSelectedOperation', hashcode:53842738
[2/22/2023 4:41:58.026 PM]
[2/22/2023 4:41:58.027 PM] Operation Dequeue : 'RunSelectedOperation'
[2/22/2023 4:41:58.039 PM] [Error] System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Microsoft.VisualStudio.TestWindow.Controller.TestContainerConfigurationQueryByTestsBase.<GetTestContainerConfigurations>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.TestWindow.Controller.TestContainerConfigurationQueryByTestsBase.<GetContainersToUpdateInternalAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.TestWindow.Controller.TestContainerConfigurationQuery.<GetAndCacheContainersToUpdateAsync>d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.TestWindow.Controller.RunOperation.<FindChangedContainersAsync>d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.TestWindow.Controller.DiscoveryOperation.<DetectChangedContainersAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.TestWindow.Controller.RunOperation.<RunTestsAsync>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.VisualStudio.TestWindow.Controller.RunOperation.<RunTestsAsync>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.TestWindow.Controller.RunOperation.<ExecuteInternalAsync>d__23.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.TestWindow.Controller.Operation.<<ExecuteAsync>b__43_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.TestWindow.Logging.ILoggerExtensions.<CallWithCatchAsync>d__11`1.MoveNext()
[2/22/2023 4:41:58.099 PM] Update Test run progress to 0/100.
Tests are not running
Additional context
Using Microsoft Visual Studio Enterprise 2022 (64-bit) - Current Version 17.5.0 nuget reference Microsoft.NET.Test.Sdk 17.4.1 nuget reference MSTest 3.0.2
Extra question, some of our build machines for some reasons have old VS2022 versions and the dev team is still with VS 2022 17.4.5. When is it recommended to upgrade Microsoft.NET.Test.Sdk to its latest version -17.5- following the visual studio release
Issue Analytics
- State:
- Created 7 months ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
getting an exception on RunSelectedOperation with VS ...
getting an exception on RunSelectedOperation with VS 2022 17.5.0 #700. Sign in to view logs · Sign in to view logs. Summary. getting...
Read more >How to fix Visual Studio 2022 17.5 Intellisense not working
This is a general problem that started with 17.5: intellisense, renaming, underlining all failing; GoToDeclaration etc all much slower.
Read more >vs 2022 v17.5 debuging problem - Microsoft Q&A
hi. i have recently upgrade my vs from 17.3 into 17.5.1. before when in my code in debug mode i had a problem...
Read more >VS2022 debugger crash with error Failed to read ...
Description: The process was terminated due to an unhandled exception. Faulting package full name: Faulting package-relative application ID:
Read more >Visual Studio 2022 Release Notes
Visual Studio 2022 version 17.5. Fixes a bug where a MultiLine TextBox in a VB-WinForms Project gets deleted, when the Text property contains...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Seems like this could be related to https://developercommunity.visualstudio.com/t/Cant-run-tests:-SystemArgumentExceptio/10256516. Do the comments shared there help @fforjan?
Yes, It would be ok, it seems you are already tracking this with the community report. So closing as such