Skip to content

Build crash when FCC try to load RunSettings #533

Description

@RemiCELLARD

Hi,

Installed product versions

  • Visual Studio: 2022 Enterprise (v17.14.8)
  • This extension: 1.1.244
  • Windows 11

Description
When a path to a project directory exceeds the 260 character limit on Windows (see : https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry ), the extension is unable to create the folders and files in the solution that are used by Fine Code Coverage.
https://stackoverflow.com/questions/79499871/fine-code-coveragefcc-throwing-issue-while-generating-the-report

Steps to recreate

  • Create test unit projet here C:\Projets\MyProj2\src\Libraries\Tools\ArchitectureTools\Tests\Architecture.InfrastructureTools.IntegrationTests
  • Enable RunMsCodeCoverage and do not fill FCCSolutionOutputDirectoryName
  • Run it and see the error at the building step

Current behavior

  • Build crash

Expected behavior

  • Build and execution without error

Side Notes

Building Test Projects
Using automatically detected runsettings file(s). To learn more visit https://aka.ms/vs-runsettings.
System.InvalidOperationException: Failed to load RunSettings file: 'C:\Projets\MyProj2\src\Libraries\Tools\ArchitectureTools\Tests\Architecture.InfrastructureTools.IntegrationTests\bin\Debug\net9.0\fine-code-coverage\coverage-tool-output\Architecture.InfrastructureTools.IntegrationTests-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.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 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__14`1.MoveNext()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions