Reqnroll icon indicating copy to clipboard operation
Reqnroll copied to clipboard

Fix TUnit test execution on .NET 10 SDK

Open Copilot opened this issue 4 months ago • 3 comments

.NET 10 SDK deprecated the VSTest MSBuild target for Microsoft.Testing.Platform. TUnit uses this platform, causing dotnet test to fail with "Testing with VSTest target is no longer supported by Microsoft.Testing.Platform on .NET 10 SDK and later."

Changes

  • VSTestExecutionDriver.cs: Use dotnet run instead of dotnet test for TUnit projects

    • dotnet run --project <path> --no-build -- --report-trx
    • Bypasses deprecated VSTest target by invoking the test executable directly
    • Removed unused runProcessAction parameter (dead code cleanup)
  • ProjectBuilder.cs: Added TestingPlatformDotnetTestSupport=true to TUnit project configuration for IDE/tooling compatibility

// TUnit execution now uses dotnet run
if (_testRunConfiguration.UnitTestProvider == UnitTestProvider.TUnit)
{
    arguments = $"run --project \"{_testProjectFolders.ProjectFolder}\" --no-build -- --report-trx";
    workingDirectory = _testProjectFolders.ProjectFolder;
}

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot avatar Nov 27 '25 22:11 Copilot

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

[!WARNING]

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • aka.ms
    • Triggering command: /usr/bin/curl curl -sL REDACTED (dns block)
    • Triggering command: /usr/bin/curl curl -sL --max-redirs 3 REDACTED (dns block)
    • Triggering command: /usr/bin/curl curl -sLI REDACTED (dns block)
  • learn.microsoft.com
    • Triggering command: /usr/bin/curl curl -sL REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot avatar Nov 27 '25 23:11 Copilot

Build : https://github.com/reqnroll/Reqnroll/actions/runs/19750018991

304NotModified avatar Nov 27 '25 23:11 304NotModified

@304NotModified is this ready for review?

gasparnagy avatar Nov 28 '25 17:11 gasparnagy