Bug 37331

Summary: Edited AXML resources in a class library are not recompiled unless you Clean
Product: Android Reporter: Paul Hickman <paul.hickman>
Component: MSBuildAssignee: dean.ellis
Severity: normal CC: cheansiong, mono-bugs+monodroid
Priority: ---    
Version: 5.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Tags: Is this bug a regression?: ---
Last known good build:
Attachments: Sample solution to illustrate problem

Description Paul Hickman 2015-12-30 11:58:29 UTC
Created attachment 14415 [details]
Sample solution to illustrate problem

If you have an AXML file that is in a library project rather than directly in the application itself, and you:

1. Compile and run the app
2. Stop the app and edit the axml file
3. Compile and run the app

The compiled app will still contain the original unedited AXML resource. You have to do a Build -> Clean Solution before step 3 for the changes to the AXML to be noticed by the compiler.

This occurs in Xamarin Studio and Visual Studio.

Attached is the standard "Hello World" Andoird app with Main.axml moved to a library to illustrate the problem. If you run this, then change the text size of the button it won't have any effect until you clean.
Comment 1 dean.ellis 2016-01-05 15:25:03 UTC
I think this is fixed in our master branch.. Will test the attached project and confirm.
Comment 2 dean.ellis 2016-01-07 14:23:21 UTC
Oddly the updated file makes it into the intermediate directory of the main app.. but it is NOT updating the apk.
Comment 3 dean.ellis 2016-01-27 14:17:51 UTC
I think I tracked down the problem. It was a mistake in the .target files we were using a Property when it should have been an Item when checked the dependencies on the _CreateBaseApk Target. Working on a fix now
Comment 4 dean.ellis 2016-02-17 10:23:51 UTC
Fixed in monodroid/master/189f9787
Comment 5 dean.ellis 2016-02-17 10:24:51 UTC
*** Bug 38023 has been marked as a duplicate of this bug. ***