-
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
[ci] Add support to net6.0 for multi-targeting in VS #7261
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e797a57
to
b2026e3
Compare
Context: xamarin/yaml-templates#180 Context: xamarin/yaml-templates#195 Context: xamarin/yaml-templates#199 Updates the build to use the latest MSI generation template. The v3 template uses the latest changes from arcade which include a large refactoring, support for multi-targeting, and support for workload pack group MSIs. The build will now produce two different VS Drop artifacts. The MSI and VSMAN files generated for SDK packs have been split out into a new `vsdrop-multitarget-signed` artifact, allowing us to include multiple versions of the SDK packs in VS. The `Microsoft.Android.Sdk` pack has been renamed to `Microsoft.Android.Sdk.net6` to match the pack alias that is referenced in the .NET 7 manifest.
b2026e3
to
4cf5fc1
Compare
src/Xamarin.Android.Build.Tasks/Microsoft.NET.Sdk.Android/WorkloadManifest.in.json
Show resolved
Hide resolved
jonathanpeppers
added a commit
to xamarin/Xamarin.Legacy.Sdk
that referenced
this pull request
Aug 25, 2022
Context: dotnet/android#7261 (comment) To make .NET 6 builds work from a .NET 7 SDK, we are changing: Microsoft.Android.Sdk To: Microsoft.Android.Sdk.net6 Microsoft.Android.Sdk.net7 To deal with this in Xamarin.Legacy.Sdk, by default it will check for: $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '6.0')) $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '7.0')) To get the old behavior, you can set: <UseMicrosoftAndroidSdk>true</UseMicrosoftAndroidSdk> Or to explicitly select, you can set one of: <UseMicrosoftAndroidSdkNet6>true</UseMicrosoftAndroidSdkNet6> <UseMicrosoftAndroidSdkNet7>true</UseMicrosoftAndroidSdkNet7>
jonathanpeppers
added a commit
to xamarin/Xamarin.Legacy.Sdk
that referenced
this pull request
Aug 25, 2022
Context: dotnet/android#7261 (comment) To make .NET 6 builds work from a .NET 7 SDK, we are changing: Microsoft.Android.Sdk To: Microsoft.Android.Sdk.net6 Microsoft.Android.Sdk.net7 To deal with this in Xamarin.Legacy.Sdk, by default it will check for: <!-- if we are not .NET 7 use .NET 6, so legacy or net6.0 will import !$([MSBuild]::VersionEquals($(TargetFrameworkVersion), '7.0')) --> <Import Sdk="Microsoft.Android.Sdk.net6" ... /> <!-- import .NET 7 if we are .NET 7 $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '7.0')) --> <Import Sdk="Microsoft.Android.Sdk.net7" ... /> To get the old behavior, you can set: <UseMicrosoftAndroidSdk>true</UseMicrosoftAndroidSdk> Or to explicitly select, you can set one of: <UseMicrosoftAndroidSdkNet6>true</UseMicrosoftAndroidSdkNet6> <UseMicrosoftAndroidSdkNet7>true</UseMicrosoftAndroidSdkNet7> In a future change, we can make .NET 7 the default, but likely only after it is released GA.
jonathanpeppers
added a commit
to xamarin/Xamarin.Legacy.Sdk
that referenced
this pull request
Aug 25, 2022
Context: dotnet/android#7261 (comment) To make .NET 6 builds work from a .NET 7 SDK, we are changing: Microsoft.Android.Sdk To: Microsoft.Android.Sdk.net6 Microsoft.Android.Sdk.net7 To deal with this in Xamarin.Legacy.Sdk, by default it will check for: <!-- if we are not .NET 7 use .NET 6, so legacy or net6.0 will import !$([MSBuild]::VersionEquals($(TargetFrameworkVersion), '7.0')) --> <Import Sdk="Microsoft.Android.Sdk.net6" ... /> <!-- import .NET 7 if we are .NET 7 $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '7.0')) --> <Import Sdk="Microsoft.Android.Sdk.net7" ... /> To get the old behavior, you can set: <UseMicrosoftAndroidSdk>true</UseMicrosoftAndroidSdk> Or to explicitly select, you can set one of: <UseMicrosoftAndroidSdkNet6>true</UseMicrosoftAndroidSdkNet6> <UseMicrosoftAndroidSdkNet7>true</UseMicrosoftAndroidSdkNet7> In a future change, we can make .NET 7 the default, but likely only after it is released GA.
jonathanpeppers
approved these changes
Aug 26, 2022
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.
This looks good, I reran a couple test phases, but we can merge if those look OK after.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context: https://github.com/xamarin/yaml-templates/pull/180
Context: https://github.com/xamarin/yaml-templates/pull/195
Context: https://github.com/xamarin/yaml-templates/pull/199
Updates the build to use the latest MSI generation template. The v3
template uses the latest changes from arcade which include a large
refactoring, support for multi-targeting, and support for workload pack
group MSIs.
The build will now produce two different VS Drop artifacts. The MSI and
VSMAN files generated for SDK packs have been split out into a new
vsdrop-multitarget-signed
artifact, allowing us to include multipleversions of the SDK packs in VS.
The
Microsoft.Android.Sdk
pack has been renamed toMicrosoft.Android.Sdk.net6
to match the pack alias that is referencedin the .NET 7 manifest.