Bug 60938 - warning XA0106 appearing after a couple of compilation, and creating invalid assemblies
Summary: warning XA0106 appearing after a couple of compilation, and creating invalid ...
Status: NEEDINFO
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 8.0 (15.4)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: dean.ellis
URL:
Depends on:
Blocks:
 
Reported: 2017-12-01 06:42 UTC by softlion
Modified: 2018-01-09 16:04 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 60938 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEEDINFO

Description softlion 2017-12-01 06:42:34 UTC
I have an issue since VS2017 15.4.4 (i suppose it is this version) where the compilation of an android app generates an empty folder for dependant assets, in obj/debug/_library_projects_/MyDependantProject.Android/

For this to happen, the android project A must be dependant on another android project B in the same solution. B must have android assets (resource/style for example).
The first compilation does work.
Subsequent compilations may work, but once it happens, every next compilation are broken. By broken, i mean the XA0106 appears and the compilation succeed, but the assembly is missing the dependant android resources.


It happens both in Debug and Release mode.
It happens both with android application and android libraries (dependant on another android lib).

A workaround is to delete the obj folder of every android project in the solution. Deleting only the obj folder of project A is not sufficient.

Any clue ?
This is time consuming.


Microsoft Visual Studio Enterprise 2017 
Version 15.4.5
VisualStudio.15.Release/15.4.5+27004.2010
Microsoft .NET Framework
Version 4.7.02556
Installed Version: Enterprise
Xamarin   4.7.10.38 (34c1b6c)
Xamarin.Android SDK   8.0.2.1 (HEAD/c2a33d8ea)
Xamarin.Android Reference Assemblies and MSBuild support.
Comment 1 Jon Douglas [MSFT] 2017-12-12 23:27:06 UTC
Thanks for the report!

Do you perhaps have a sample project demonstrating this observation? I would be curious to investigate this further and see what's going on here.

The warning is created from the following code: 

https://github.com/xamarin/xamarin-android/blob/master/src/Xamarin.Android.Build.Tasks/Utilities/ResourceDesignerImportGenerator.cs#L62-L92

which is invoked by:

https://github.com/xamarin/xamarin-android/blob/master/src/Xamarin.Android.Build.Tasks/Utilities/ResourceDesignerImportGenerator.cs#L37-L60

From a first glance, it sounds like a resource merging issue?
Comment 2 James Esh 2018-01-09 15:23:03 UTC
This still has not been fixed.  Any status on it?
Comment 3 Jon Douglas [MSFT] 2018-01-09 16:01:28 UTC
(In reply to James Esh from comment #2)
> This still has not been fixed.  Any status on it?

The bug is in NEEDINFO as it requires a reliable way to reproduce to help aid investigation. If you have a reproduction that you can upload to this bug report, it would help with investigating the cause of this.
Comment 4 James Esh 2018-01-09 16:04:29 UTC
Ah, ok.  I do not have a good way to reproduce it (our project is massive), but it happened today when i upgraded all the Xamarin and Xamarin.Android.Support packages.