dotnet / dotnet/android

Changing <Bind> item metadata does not rerun appropriate parts of the build

Open
#9,184 6 comments 0 reactions 2 assignees Claimed by @dellis1972 View on GitHub
Area: App+Library Build
Dominant language
C#
Stars
2.1k
Forks
579
Avg merge
1d 20h
Merged PRs (30d)
257

Description

### Android framework version

net8.0-android

### Affected platform version

.NET 8.0.303

### Description

When changing item metadata from `true` to `false` or vice versa, `dotnet build` doesn't pick the change up, I need to perform a `dotnet clean` first before `dotnet build` works again.

[msbuild.binlog.zip](https://github.com/user-attachments/files/16562145/msbuild.binlog.zip)

### Steps to Reproduce

1. Create a new Android binding library
2. Add an AAR to the project and select AndroidLibrary as build action (should add a blank ``)
3. Set `` to `false`.
4. Build the project through the .NET CLI
5. Set `` to `true`
6. Build the project through the .NET CLI again and see that it produces the same result of not binding the AAR

### Did you find any workaround?

Perform `dotnet clean` first after changing from `true` to `false` or vice versa.

### Relevant log output

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.