Bug 35896

Summary: AndroidResgen: Warning while updating Resource XML ".xml.tmp" The filename, directory name, or volume label syntax is incorrect.
Product: Android Reporter: Jon Douglas [MSFT] <jon.douglas>
Component: MSBuildAssignee: dean.ellis
Status: RESOLVED FIXED    
Severity: normal CC: adrian.murphy, brendan.zagaeski, danl, mono-bugs+monodroid, pj.beaman, rezamk, roycornelissen
Priority: ---    
Version: 6.0.0   
Target Milestone: 6.1 (C7)   
Hardware: PC   
OS: Windows   
Tags: Is this bug a regression?: ---
Last known good build:
Attachments: Test case

Description Jon Douglas [MSFT] 2015-11-16 12:13:19 UTC
*Description:

While running a build through TFS, this respective warning only allows the build to pass as a "Partial Success" and thus it seems this is the offender.

AndroidResgen: Warning while updating Resource XML 'obj\CI\res\values\isagenix_themes.xml.tmp': The filename, directory name, or volume label syntax is incorrect.

It seems that within the respective Task we fixup resource files/type names/etc and this file is generated ".xml.tmp".

Secondly it seems that the actual stack trace is not logged, but we only catch the exception and continue on.

*Log Files:

https://gist.github.com/JonDouglas/7c85d489e259f169ddbd

*Reproduction:

/*PENDING ON CUSTOMER*/

*Version Information

Xamarin VS 4.0.0.1686

Xamarin.Android 6.0.0.33
Comment 4 dean.ellis 2015-12-10 11:46:45 UTC
I have managed to replicate the issue :) Will look at a fix now
Comment 5 dean.ellis 2015-12-10 13:19:11 UTC
The warning is caused by the following 

<item name="android:textColorPrimary">@android:color/white</item>

Our processor is not taking into account the @android: part of the value. On windows : is NOT a valid filename/directory value which is why the warning is raised. So we need to do two things. 

1) Fix the processor to handle @android:
2) Fix the error reporting to use normal MSBuild Logging rather than Console.Error.
Comment 6 dean.ellis 2015-12-11 13:05:02 UTC
Fixed in monodroid/master/257b5816
Comment 7 Roy Cornelissen 2016-02-12 14:03:27 UTC
I'm still having this issue on our Android build via TFS. Using Xamarin 4.0.1.96 and Xamarin.Android 6.0.1.10.

Is this a regression?
Comment 8 dean.ellis 2016-02-12 14:52:40 UTC
@roy this has not made it into a release yet. I will be in our next release.
Comment 9 PJ 2016-02-18 21:58:41 UTC
This will be included in our C7 release, updating milestone to reflect that.
Comment 10 Reza 2016-03-21 01:11:49 UTC
Do you have any dates on when this will make it into the release?  The last update doesn't seem to fix it?
Comment 11 Brendan Zagaeski (Xamarin Team, assistant) 2016-03-25 00:26:34 UTC
Created attachment 15521 [details]
Test case

The candidate fix from Comment 6 is included in the current Cycle 7 Preview builds on the Alpha channel. If any user is still hitting the issue after updating to that version, please file a new bug report and attach a minimized test case that replicates the issue. Thanks!




## Steps to verify

Build the attached test case using MSBuild in a `cmd.exe` developer command prompt on Windows, redirecting standard output (STDOUT) to a file:

> msbuild /t:Rebuild AndroidApp1.sln > build.txt



(Testing notes: The warnings are _not_ within the `build.txt` but are instead displayed directly in the command prompt as part of the STDERR output.)




## Verification status: verified fixed in XamarinVS 4.1.0.111

GOOD: XamarinVS 4.1.0.111 (a78562a) (Xamarin.Android   6.1.0.16 (a908ff1))
BAD:  XamarinVS 4.0.1.145 (f869dba) (Xamarin.Android   6.0.2.1  (46c3f7e))




## GOOD results (with 4.1.0.111)

No messages are displayed in the command prompt.




## BAD results (with 4.0.1.145)

The following warnings appear in the command prompt during the build:

> AndroidResgen: Warning while updating Resource XML 'obj\Debug\res\values\styles.xml.tmp': The filename, directory name, or volume label syntax is incorrect.
> 
> AndroidResgen: Warning while updating Resource XML 'obj\Debug\res\values\styles.xml.tmp': The filename, directory name, or volume label syntax is incorrect.
> 
> AndroidResgen: Warning while updating Resource XML 'obj\Debug\res\values\styles.xml.tmp': The filename, directory name, or volume label syntax is incorrect.