Skip to content

[build] target net6.0 instead of netcoreapp3.1 #829

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

Merged
merged 3 commits into from
May 5, 2021
Merged

[build] target net6.0 instead of netcoreapp3.1 #829

merged 3 commits into from
May 5, 2021

Conversation

jonathanpeppers
Copy link
Member

Context: dotnet/android#5891
Context: dotnet/android@e59f649

xamarin-android should imminently be building libraries targeting net6.0 instead of netcoreapp3.1.

We should be able to do this now, because Mono 6.12.0.137 supports building both .NET 5.0 and .NET 6.0.

@jonathanpeppers jonathanpeppers force-pushed the net6.0 branch 4 times, most recently from 4a5e671 to 55b2eb5 Compare April 30, 2021 14:00
jonathanpeppers added a commit to jonathanpeppers/xamarin-android that referenced this pull request Apr 30, 2021
@jonathanpeppers jonathanpeppers force-pushed the net6.0 branch 4 times, most recently from f8d3840 to a4faf0f Compare April 30, 2021 19:42
jonathanpeppers added a commit to jonathanpeppers/xamarin-android that referenced this pull request Apr 30, 2021
jonathanpeppers added a commit to jonathanpeppers/xamarin-android that referenced this pull request Apr 30, 2021
Context: dotnet/android#5891
Context: dotnet/android@e59f649

xamarin-android should imminently be building libraries targeting `net6.0` instead of `netcoreapp3.1`.

We should be able to do this now, because Mono 6.12.0.137 supports building both .NET 5.0 and .NET 6.0.
jonathanpeppers added a commit to jonathanpeppers/xamarin-android that referenced this pull request May 3, 2021
jonathanpeppers added a commit to jonathanpeppers/xamarin-android that referenced this pull request May 3, 2021
jonathanpeppers added a commit to jonathanpeppers/xamarin-android that referenced this pull request May 3, 2021
@jonathanpeppers
Copy link
Member Author

This is green! dotnet/android#5895

@jonathanpeppers jonathanpeppers marked this pull request as ready for review May 3, 2021 23:14
@jonathanpeppers jonathanpeppers requested review from jonpryor and jpobst May 3, 2021 23:14
@jpobst
Copy link
Contributor

jpobst commented May 3, 2021

This also seems to add several new NRT-related warnings to the build, but they can be fixed later in a separate PR.

NOTE: in xamarin-android, this project gets built by xabuild in Xamarin.Android-Tests.sln
Exclude net6.0, because xabuild cannot build net5.0 or higher
-->
<PropertyGroup Condition=" '$(XABuild)' == 'true' ">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What sets $(XABuild)? I don't see any "obvious" references within xamarin-android:

% git grep '\<XABuild\>'
tools/xabuild/XABuild.cs:       class XABuild

Is this via some MSBuild magic?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is magic, this XML file we generate presets MSBuild properties:

https://github.com/xamarin/xamarin-android/pull/5895/files#diff-3b8f9e4db31a6f4b54073ea66ded003fa77ec1573d42406911e0e3b7a691acbcR122

So I made any xabuild invocation set this property by default.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonpryor
Copy link
Member

jonpryor commented May 5, 2021

Context: https://github.com/xamarin/xamarin-android/pull/5891
Context: https://github.com/xamarin/xamarin-android/commit/e59f6493fedd789cbd3157d369104516cfffd3f0

xamarin/xamarin-android should imminently be building libraries
targeting `net6.0` instead of `netcoreapp3.1`.

We should be able to do this now, because Mono 6.12.0.137 supports
building both .NET 5.0 and .NET 6.0.

Update all appropriate `$(TargetFrameworks)` values so that `net6.0`
is used instead of `netcoreapp3.1`.

Update `global.json` so that a Prerelease .NET 6 SDK is used, and use
`boots` to install the preview version of Mono which supports
targeting `net6.0`.

@jonpryor jonpryor merged commit 4d0cba6 into main May 5, 2021
@jonpryor jonpryor deleted the net6.0 branch May 5, 2021 15:12
@jpobst jpobst added this to the 11.4 (16.11 / 8.11) milestone May 5, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants