Skip to content
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

[Xamarin.Android.Build.Tasks] PackageReference and AndroidUseLatestPlatformSdk do not work together #873

Merged
merged 1 commit into from
Sep 24, 2017

Conversation

dellis1972
Copy link
Contributor

@dellis1972 dellis1972 commented Sep 19, 2017

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.

@dellis1972 dellis1972 added the do-not-merge PR should not be merged. label Sep 20, 2017
@dellis1972
Copy link
Contributor Author

This doesn't work. Need to rework it

…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`.
@dellis1972 dellis1972 removed the do-not-merge PR should not be merged. label Sep 22, 2017
@dellis1972
Copy link
Contributor Author

Tests are in #846

@jonpryor jonpryor merged commit 5e5e178 into dotnet:master Sep 24, 2017
@jonpryor jonpryor mentioned this pull request Sep 24, 2017
jonpryor added a commit to jonpryor/xamarin-android that referenced this pull request Aug 25, 2021
Changes: http://github.com/xamarin/Java.Interop/compare/ff2714200107fb616828b9d1013f69605791d2ba...9a878f211c86bdd37cb71c5c461f85a0c1a1480d

  * dotnet/java-interop@9a878f21: [build] Properly implement "parent directory.override.props" (dotnet#300) (dotnet#873)
  * dotnet/java-interop@0c5d454c: [Java.Interop] fix .NET 6 linker warnings (dotnet#870)
  * dotnet/java-interop@8898bc14: [build] Import $(MSBuildProjectDirectory).override.props (dotnet#872)
  * dotnet/java-interop@d16b1e56: [build] Use GitInfo to generate $(Version) (dotnet#865)
  * dotnet/java-interop@2eb9ff26: [build] .NET 6 P7 Support (dotnet#869)

Set `$(XamarinAndroidToolsDirectory)` for `external/Java.Interop`
so that the Java.Interop build uses `external/xamarin-android-tools`.
jonpryor added a commit to jonpryor/xamarin-android that referenced this pull request Aug 26, 2021
Changes: http://github.com/xamarin/Java.Interop/compare/ff2714200107fb616828b9d1013f69605791d2ba...b7982e423952a4c4afe0c33f36ac80eed7fa57a2

  * dotnet/java-interop@b7982e42: Revert "[build] Use GitInfo to generate $(Version) (dotnet#865)" (dotnet#874)
  * dotnet/java-interop@9a878f21: [build] Properly implement "parent directory.override.props" (dotnet#300) (dotnet#873)
  * dotnet/java-interop@0c5d454c: [Java.Interop] fix .NET 6 linker warnings (dotnet#870)
  * dotnet/java-interop@8898bc14: [build] Import $(MSBuildProjectDirectory).override.props (dotnet#872)
  * dotnet/java-interop@d16b1e56: [build] Use GitInfo to generate $(Version) (dotnet#865)
  * dotnet/java-interop@2eb9ff26: [build] .NET 6 P7 Support (dotnet#869)

Set `$(XamarinAndroidToolsDirectory)` for `external/Java.Interop`
so that the Java.Interop build uses `external/xamarin-android-tools`.
jonpryor added a commit that referenced this pull request Aug 26, 2021
Changes: http://github.com/xamarin/Java.Interop/compare/ff2714200107fb616828b9d1013f69605791d2ba...b7982e423952a4c4afe0c33f36ac80eed7fa57a2

  * dotnet/java-interop@b7982e42: Revert "[build] Use GitInfo to generate $(Version) (#865)" (#874)
  * dotnet/java-interop@9a878f21: [build] Properly implement "parent directory.override.props" (#300) (#873)
  * dotnet/java-interop@0c5d454c: [Java.Interop] fix .NET 6 linker warnings (#870)
  * dotnet/java-interop@8898bc14: [build] Import $(MSBuildProjectDirectory).override.props (#872)
  * dotnet/java-interop@d16b1e56: [build] Use GitInfo to generate $(Version) (#865)
  * dotnet/java-interop@2eb9ff26: [build] .NET 6 P7 Support (#869)

Set `$(XamarinAndroidToolsDirectory)` for `external/Java.Interop`
so that the Java.Interop build uses `external/xamarin-android-tools`.
@github-actions github-actions bot locked and limited conversation to collaborators Feb 2, 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