You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Java.Interop.Tools.TypeNameMappings] introduce project for net8.0 (#1199)
Context: dotnet/android#8751
Context: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=9137456&view=logs&j=96fd57f5-f69e-53c7-3d47-f67e6cf9b93e&s=1afc3bfe-122c-538b-e9ad-2a86c2efcfef&t=38f83f46-bc21-5edd-1614-e44f20babf10&l=29658
Context: 67c079c
Context: 56b7eebdotnet/android#8751 has a random build failure:
"Xamarin.Android.sln" (default target) (1:2) ->
"src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj" (default target) (28:9) ->
(CoreCompile target) ->
src/Xamarin.Android.Build.Tasks/Utilities/MamJsonParser.cs(92,43): error CS0122: 'NotNullWhenAttribute' is inaccessible due to its protection level [src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj]
src/Xamarin.Android.Build.Tasks/Utilities/MamJsonParser.cs(92,81): error CS0122: 'NotNullWhenAttribute' is inaccessible due to its protection level [src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj]
src/Xamarin.Android.Build.Tasks/Utilities/MavenExtensions.cs(26,32): error CS0122: 'NotNullWhenAttribute' is inaccessible due to its protection level [src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj]
It happens some percentage of the time…
Similar to 67c079c, the cause is that commit 56b7eeb updated
`Java.Interop.Tools.JavaCallableWrappers.csproj` to multitarget both
netstandard2.0 and net8.0, and on some builds the
`Java.Interop.Tools.JavaCallableWrappers.dll` used by
`Xamarin.Android.Build.Tasks.csproj` is the net8.0 build, *not* the
netstandard2.0 build.
To fix this:
* Don't build `Java.Interop.Tools.JavaCallableWrappers.csproj` for
`net8.0` anymore; remove net8.0 from `$(TargetFrameworks)`.
* Introduce a new `Java.Interop.Tools.TypeNameMappings.csproj`
project which builds the source code within
`Java.Interop.Tools.JavaCallableWrappers.csproj` for net8.0.
The resulting assembly is not shipped or used. It can check
trimmer warnings, though.
This partially reverts 67c079c and 56b7eeb.
0 commit comments