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

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

    [ https://issues.apache.org/jira/browse/PROTON-2560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17551769#comment-17551769 ] 

ASF subversion and git services commented on PROTON-2560:
---------------------------------------------------------

Commit b18b73702c015fea1833bd597cacb912a2064207 in qpid-proton-dotnet's branch refs/heads/main from Timothy Bish
[ https://gitbox.apache.org/repos/asf?p=qpid-proton-dotnet.git;h=b18b737 ]

PROTON-2560 Allow tests and examples builds to roll forward by default

Allows the executable outputs of the tests and examples projects to roll
forward to the next major release of .NET framework to allow for builds
to find the installed framework


> 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-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org