Skip to content

Conversation

@jpobst
Copy link
Contributor

@jpobst jpobst commented May 4, 2020

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
Copy link
Contributor Author

jpobst commented May 18, 2020

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@jonathanpeppers jonathanpeppers left a comment

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.

5 participants