0

I am unable to run the Test Cases in Visual Studio 2022 as it throws below error:

System.InvalidOperationException: Failed to load RunSettings file: 'C:\Users\<abc>\source\repos\<someproject>\<someproject>.Application.Tests\bin\Debug\net6.0\fine-code-coverage\coverage-tool-output\<someproject>.Application.Tests-fcc-mscodecoverage-generated.runsettings'. Please check if the file exists and is valid.
   at Microsoft.VisualStudio.TestWindow.Controller.RunsettingsProvider.GenerateTestRunSettings(RunSettingConfigurationInfoState infoState, String runSettingsFilePath, IUserRunSettings runsettings, IEnumerable`1 runSettingsServices, IEnumerable`1 customSettingsImporters, RequestConfiguration requestConfiguration, ITestWindowVSTelemetry telemetryService)
   at Microsoft.VisualStudio.TestWindow.Core.Client.ContainerRunSettingsProvider.<GetRunAllSettingsMapAsync>d__4.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.<GetSessionRunsettingsMapAsync>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.DiscoverSelectedOperation.<ExecuteInternalAsync>d__5.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()

I have tried to update the extension as well as Visual Studio but it didn't solve the issue. Can someone please help me with this?

TestExplorer

2
  • Please check if you have all this nuget packages installed: 1 - Microsoft.Testk.Sdk 2 - xunit 3 - xunit.runner.visualstudio
    – guirms
    Commented Apr 12 at 11:31
  • @guirms The Packages are already installed. Also my peers are able to run the test cases, it just my local machine is failing. Commented Apr 15 at 10:06

1 Answer 1

0

I have updated RunMsCodeCoverage to "No" from FineCodeCoverage settings and it started working. Settings

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.