-
Notifications
You must be signed in to change notification settings - Fork 538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump to xamarin/java.interop/master@a8f68e56 #5497
Bump to xamarin/java.interop/master@a8f68e56 #5497
Conversation
Looks like we do need this: dotnet/java-interop#779 because of the
|
39ff255
to
f2e2665
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's another issue with SupportedOSPlatformAttribute
.
/Users/runner/work/1/s/tests/Mono.Android-Tests/Java.Interop-Tests/obj/Release/net6.0-android/Java.Interop-Tests.NET.AssemblyInfo.cs(21,38): error CS0433: The type 'SupportedOSPlatformAttribute' exists in both 'Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' and 'System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' [/Users/runner/work/1/s/tests/Mono.Android-Tests/Java.Interop-Tests/Java.Interop-Tests.NET.csproj] [/Users/runner/work/1/s/tests/Mono.Android-Tests/Runtime-Microsoft.Android.Sdk/Mono.Android.NET-Tests.csproj]
I think the problem here is that the attribute class is also added to @jpobst do we need it generated in multiple places? Would it be possible to just add it to legacy |
So... But we can't do that because So that leaves us needing to build this entire repo with |
I think this is a special case because we use Normally the What was the fix for the other place we were seeing this? Can it be applied to |
f2e2665
to
35a341e
Compare
I added |
We can also just comment out this code until we are building with |
@jpobst yeah, it didn't work, got a bunch of errors like:
Could we put it behind a feature flag? It seems like it work work in apps, but not |
We can comment it out for now, until we are compiling .NET 5/6 properly. It's really only needed for |
Context: da12df4 Context: a33084b Context: dotnet/android#5497 (review) We cannot currently build `net5.0` or `net6.0` assemblies in our xamarin-android tree; we instead do some workaround that involves compiling with `netcoreapp3.1` while referencing the 5.0 BCL. This creates a conflict between the local `[SupportedOSPlatform]` we create in `Mono.Android.dll` built for `netcoreapp3.1` , and the real one in the 5.0 BCL. error CS0433: The type 'SupportedOSPlatformAttribute' exists in both 'Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' and 'System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' [/Users/runner/work/1/s/tests/Mono.Android-Tests/Java.Interop-Tests/Java.Interop-Tests.NET.csproj] Disable generating `SupportedOSPlatformAttribute` until we can build `Mono.Android.dll` with `NET` defined, in which case it will not contain the local attribute, and we can re-enable da12df4.
35a341e
to
fce268f
Compare
Weird error, trying rebuild.
|
fce268f
to
57a070b
Compare
Changes: dotnet/java-interop@3894cd7...a8f68e5 * Use `const` instead of `static readonly` * [generator] Disable [SupportedOSPlatform] until .NET 5/6. * [generator] Wrap SupportedOSPlatformAttribute in NET * [build] use $(RollForward)=Major for console apps * [Java.Interop] Conditionally call ManagedPeer.Init() * [generator] Add [SupportedOSPlatform] in assemblies using ApiSince * [global.json] Update Microsoft.Build.NoTargets to 2.0.1.
57a070b
to
b9713ca
Compare
Changes: dotnet/java-interop@3894cd7...a8f68e5
const
instead ofstatic readonly