You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Robbie Gemmell (Jira)" <ji...@apache.org> on 2022/06/08 17:21:00 UTC

[jira] [Created] (PROTON-2560) running tests can fail on system with only .Net 6 installed

Robbie Gemmell created PROTON-2560:
--------------------------------------

             Summary: running tests can fail on system with only .Net 6 installed
                 Key: PROTON-2560
                 URL: https://issues.apache.org/jira/browse/PROTON-2560
             Project: Qpid Proton
          Issue Type: Test
          Components: proton-dotnet
    Affects Versions: proton-dotnet-1.0.0-M1
            Reporter: Robbie Gemmell
            Assignee: Timothy A. Bish
             Fix For: proton-dotnet-1.0.0-M2
         Attachments: dotnet-build.diff

Running the tests can fail on system with only .Net 6 installed. This seems to be expected due to the build targeting 5.0.0, along with the default 'rollforward' policy handling being 'Minor', per [https://docs.microsoft.com/en-us/dotnet/core/versions/selection#framework-dependent-apps-roll-forward.]

This was observed on a Fedora 36 install, where running "./build.sh test" showed that the initial build completed, but then the test steps failed as only a 6.0.x install was found, e.g:
{quote} Starting test execution, please wait...
Testhost process exited with error: It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '5.0.0' (x64) was not found.
 - The following frameworks were found:
6.0.5 at [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]
You can resolve the problem by installing the specified framework and/or SDK.
The specified framework can be found at:
 - [https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=5.0.0&arch=x64&rid=fedora.36-x64]
. Please check the diagnostic logs for more information.{quote}

It was possible to pass properties to the dotnet build/test command to make the existing 1.0.0-M1 tests run successfully otherwise unaltered on F36, e.g:
{noformat}
dotnet build /property:DefaultUnitTestTargetFrameworks=net6.0 /property:DefaultExeTargetFrameworks=net6.0
dotnet test /property:DefaultUnitTestTargetFrameworks=net6.0 /property:DefaultExeTargetFrameworks=net6.0
{noformat}

It was also possible to get the tests running by updating them to add "<RollForward>LatestMajor</RollForward>" property config to the .csproj files (e.g see attached diff).



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org