Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Xamarin.Android.Build.Tasks] PackageReference and AndroidUseLatestPl…
…atformSdk do not work together Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=59534 When using `PackageReference` with our system it run before `_SetLatestTargetFrameworkVersion`. As a result it always uses a `$(TargetFrameworkVersion)` of v2.3 or what ever the user defined in the project manually. So we need to make sure that `_SetLatestTargetFrameworkVersion` runs as part of the `PackageReference` target chain. Fortunately that chain is run as part of `ResolveNuGetPackageAssetsDependsOn`. As well as `_GetRestoreTargetFrameworksOutput`. So we just need to make sure that our target in run as part of that target chain in order to fix this issue. We also need to update a few NuGet specific properties to ensure that it uses the correct `TargetPlatformMoniker`. This is done via the `NuGetTargetMoniker`.
- Loading branch information