Skip to content

[XA.Build.Tasks] Use 'android-R' instead of 'android-30' to properly find preview bindings.#4651

Merged
jonpryor merged 1 commit into
masterfrom
tasks-r
May 19, 2020
Merged

[XA.Build.Tasks] Use 'android-R' instead of 'android-30' to properly find preview bindings.#4651
jonpryor merged 1 commit into
masterfrom
tasks-r

Conversation

@jpobst

@jpobst jpobst commented May 4, 2020

Copy link
Copy Markdown
Contributor

Context: #4356

In order to build preview bindings on Windows, we set the following properties in Configuration.props:

<AndroidLatestStableApiLevel Condition="'$(AndroidLatestStableApiLevel)' == ''">30</AndroidLatestStableApiLevel>
<AndroidLatestStablePlatformId Condition="'$(AndroidLatestStablePlatformId)' == ''">R</AndroidLatestStablePlatformId>
<AndroidLatestStableFrameworkVersion Condition="'$(AndroidLatestStableFrameworkVersion)'==''">v10.0.99</AndroidLatestStableFrameworkVersion>

This writes the generated files to src\Mono.Android\obj\$(Configuration)\monoandroid10\android-R\mcw, however Xamarin.Android.Build.Tasks.csproj is looking in src\Mono.Android\obj\$(Configuration)\monoandroid10\android-30\mcw, because it is using $(AndroidLatestStableApiLevel) instead of $(AndroidLatestStablePlatformId). Fixing this allows msbuild Xamarin.Android.sln to succeed on Windows.

@jpobst
jpobst marked this pull request as ready for review May 18, 2020 19:33
@jpobst

jpobst commented May 18, 2020

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@jonathanpeppers jonathanpeppers left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The .NET 5 test failures should be fixed by: #4692

@jonpryor
jonpryor merged commit 2a9f3c5 into master May 19, 2020
@jonpryor
jonpryor deleted the tasks-r branch May 19, 2020 19:41
jonpryor pushed a commit that referenced this pull request May 26, 2020
Context: a348617

In order to build preview bindings on Windows, we set the following
properties in `Configuration.props`:

	<AndroidLatestStableApiLevel Condition="'$(AndroidLatestStableApiLevel)' == ''">30</AndroidLatestStableApiLevel>
	<AndroidLatestStablePlatformId Condition="'$(AndroidLatestStablePlatformId)' == ''">R</AndroidLatestStablePlatformId>
	<AndroidLatestStableFrameworkVersion Condition="'$(AndroidLatestStableFrameworkVersion)'==''">v10.0.99</AndroidLatestStableFrameworkVersion>

This writes the generated files to
`src\Mono.Android\obj\$(Configuration)\monoandroid10\android-R\mcw`.

However `Xamarin.Android.Build.Tasks.csproj` is looking for files in
`src\Mono.Android\obj\$(Configuration)\monoandroid10\android-30\mcw`,
because it is using `$(AndroidLatestStableApiLevel)` instead of
`$(AndroidLatestStablePlatformId)`.

Update `Xamarin.Android.Build.Tasks.csproj` to use
`$(AndroidLatestStablePlatformId)`, which allows
`msbuild Xamarin.Android.sln` to succeed on Windows when using
building for 30/R/v10.0.99.
@github-actions github-actions Bot locked and limited conversation to collaborators Jan 24, 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.

4 participants