dotnet test on Azure Devops has .NET 8 and requires .NET 6 and crashes?
I'm getting the following logs when attempting to run .NET tests:
Starting test execution, please wait...A total of 1 test files matched the specified pattern.Testhost process for source(s) '/home/vsts/work/1/s/[redacted].Test/bin/Release/net6.0/win-x64/[redacted].Test.dll' exited with error: You must install or update .NET to run this application.App: /home/vsts/work/1/s/CommonProjects/[redacted].Test/bin/Release/net6.0/win-x64/testhost.dllArchitecture: x64Framework: 'Microsoft.NETCore.App', version '6.0.0' (x64).NET location: /opt/hostedtoolcache/dotnet/The following frameworks were found: 8.0.6 at [/opt/hostedtoolcache/dotnet/shared/Microsoft.NETCore.App]Learn more:https://aka.ms/dotnet/app-launch-failedTo install missing framework, download:https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=6.0.0&arch=x64&rid=linux-x64&os=ubuntu.22.04. Please check the diagnostic logs for more information.Results File: /home/vsts/work/_temp/_fv-az633-354_2024-05-31_14_52_14.trx
Starting test execution, please wait...A total of 1 test files matched the specified pattern.Testhost process for source(s) '/home/vsts/work/1/s/[redacted].Test/bin/Release/net6.0/win-x64/[redacted].Test.dll' exited with error: You must install or update .NET to run this application.App: /home/vsts/work/1/s/CommonProjects/[redacted].Test/bin/Release/net6.0/win-x64/testhost.dllArchitecture: x64Framework: 'Microsoft.NETCore.App', version '6.0.0' (x64).NET location: /opt/hostedtoolcache/dotnet/The following frameworks were found: 8.0.6 at [/opt/hostedtoolcache/dotnet/shared/Microsoft.NETCore.App]Learn more:https://aka.ms/dotnet/app-launch-failedTo install missing framework, download:https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=6.0.0&arch=x64&rid=linux-x64&os=ubuntu.22.04. Please check the diagnostic logs for more information.Results File: /home/vsts/work/_temp/_fv-az633-354_2024-05-31_14_52_14.trx