[ 
https://issues.apache.org/jira/browse/PROTON-2560?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Timothy A. Bish updated PROTON-2560:
------------------------------------
    Summary: Running tests can fail on system with only .NET 6 installed  (was: 
running tests can fail on system with only .Net 6 installed)

> 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
>            Priority: Minor
>             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-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to