Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Conversation

@jonathanpeppers
Copy link
Member

Context: dotnet/android#7023

In order to support AutoImport.props across multiple versions of the
Android workload in .NET 6 and .NET 7, we have to condition
AutoImport.props behind:

Condition=" '$(TargetPlatformIdentifier)' == 'android' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '6.0')) ..."
Condition=" '$(TargetPlatformIdentifier)' == 'android' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '7.0')) ..."

This breaks Xamarin.Legacy.Sdk, as a monoandroid12 application
would have $(TargetFrameworkVersion) set to v12.0.

The only sensible way to workaround this is to provide an Android
AutoImport.props in Xamarin.Legacy.Sdk. We need to do this, because
xamarin/AndroidX builds using Xamarin.Legacy.Sdk.

TBD what happens for iOS and macOS, as they have not implemented the
Condition in AutoImport.props yet in the xamarin-macios repo.

Context: dotnet/android#7023

In order to support `AutoImport.props` across multiple versions of the
Android workload in .NET 6 and .NET 7, we have to condition
`AutoImport.props` behind:

    Condition=" '$(TargetPlatformIdentifier)' == 'android' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '6.0')) ..."
    Condition=" '$(TargetPlatformIdentifier)' == 'android' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '7.0')) ..."

This breaks `Xamarin.Legacy.Sdk`, as a `monoandroid12` application
would have `$(TargetFrameworkVersion)` set to `v12.0`.

The only sensible way to workaround this is to provide an Android
`AutoImport.props` in Xamarin.Legacy.Sdk. We need to do this, because
xamarin/AndroidX builds using Xamarin.Legacy.Sdk.

TBD what happens for iOS and macOS, as they have not implemented the
`Condition` in `AutoImport.props` yet in the xamarin-macios repo.
@jonathanpeppers jonathanpeppers force-pushed the AutoImport.Android.props branch from 3d772f2 to 2257252 Compare May 25, 2022 21:05
@jonathanpeppers jonathanpeppers merged commit ce48ad6 into main May 25, 2022
@jonathanpeppers jonathanpeppers deleted the AutoImport.Android.props branch May 25, 2022 21:13
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.

2 participants