Skip to content

[.NET 5] System.Threading.SynchronizationContext.Current is null  #4655

@pjcollins

Description

@pjcollins

The following test is failing against our early .NET 5 preview support:
https://github.com/xamarin/xamarin-android/blob/3f743678d3e7c19fc6f6e8f6928bfe4ae7d55ff0/src/Mono.Android/Test/Android.App/ApplicationTest.cs#L24

Steps to Reproduce

  1. Ensure you have a recent .NET 5 preview build installed - https://github.com/dotnet/installer#installers-and-binaries

  2. Download the repro here:
    BuildXASdkProjectFalse.zip

  3. Run the sample and click the button

dotnet build /t:Run ~/Downloads/BuildXASdkProjectFalse/UnnamedProject.csproj /v:n

The following is null, and the test fails

var c = System.Threading.SynchronizationContext.Current;

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions