Bug 26438 - Double-clicking Android build error fails to open layout file
Summary: Double-clicking Android build error fails to open layout file
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 4.20.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: dean.ellis
Depends on:
Reported: 2015-01-26 21:26 UTC by domen
Modified: 2015-01-29 15:06 UTC (History)
3 users (show)

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 26438 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:

Description domen 2015-01-26 21:26:48 UTC
When build error occurs in Android layout named Something.axml, Xamarin Studio wants to open file something.xml when double-clicking the error in Errors pad.

Steps to reproduce:
1. Create layout file named Something.axml (use uppercase letter and extension .axml, not .xml) in Android project.
2. Add ImageView referencing to some unexisting drawable.
3. Build project.
4. Project will not build. There will be an error in Errors pad.
5. Open that pad and double click the error (error says something like "No resource found that matches the given name (at 'src' with value '@drawable/...').").
6. Dialog box should open, saying "File not found: C:\...\Resources\layout\something.xml".

If extension is .xml instead of .axml, Studio will open the file. But there is still a problem with uppercase letters. When this error happens in Resources\values\Styles.xml, Xamarin will open file styles.xml instead of Styles.xml, which will work fine (on Windows at least), but when saving file, file will be automatically renamed to lowercase version, which is not desirable.

My Xamarin version data:

Xamarin Studio
Version 5.7 (build 661)
Installation UUID: 59a6b98a-f16f-4f0a-9aa9-e5192209be89
    Microsoft .NET 4.0.30319.34209
    GTK+ 2.24.22 (MS-Windows theme)
    GTK# 2.12.26

Version: 4.20.0 (Indie Edition)
Android SDK: [...]
    Supported Android versions:
        4.0.3 (API level 15)
        4.1   (API level 16)
        4.4   (API level 19)
        5.0   (API level 21)
Java SDK: [...]
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) Client VM (build 24.71-b01, mixed mode, sharing)

Build Information
Release ID: 507000661
Git revision: b70bab61da996da29045ea8ee8aed1a6faedbe78
Build date: 2015-01-05 11:27:37-05
Xamarin addins: 82f6c71490562d6cd125a09287f441902fdac3d7
Comment 1 Naqeeb 2015-01-29 12:47:26 UTC
I have checked this issue with the help of steps given in bug and able to reproduce this issue successfully.  I have followed steps below to reproduce
1. Open XS.
2. Create Android project.
3. Add Layout file named 'Something.axml' in folder 'layout'.
4. Add ImageView on Something.axml file.
5. Go ImageView property and change src like '@android:drawable/ic_menu_gallery1'
6. Build project.
7. Project will not build. There will be an error in Errors pad.
8. Double click on error, Dialog box open, saying "File not found:C:\...\Resources\layout\something.xml".
9. When I changed the file name from 'Something.axml' to 'Something.xml', save the file and again build the project got the build error.
10. Double click on error it is open file with name 'something.xml' in editor successfully but in editor it's name contains lowercase instead of uppercase.

Please refer screencast : http://www.screencast.com/t/940JaAUS

Build Output : https://gist.github.com/saurabh360/ba43d77147d5a0bf8130
Ide logs : https://gist.github.com/saurabh360/9be25deb662e8d6f68b2

Environment info: 
=== Xamarin Studio ===

Version 5.7.1 (build 15)
Installation UUID: a984b906-a6b3-414c-81f5-68fb983ac835
	Microsoft .NET 4.0.30319.18449
	GTK+ 2.24.22 (MS-Windows theme)
	GTK# 2.12.26

=== Xamarin.Android ===

Version: 4.20.0 (Business Edition)
Android SDK: D:\MonoForAndroid\AndroidSDK
	Supported Android versions:
		1.6    (API level 4)
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: C:\Program Files (x86)\Java\jdk1.7.0_60
java version "1.7.0_60-ea"
Java(TM) SE Runtime Environment (build 1.7.0_60-ea-b15)
Java HotSpot(TM) Client VM (build 24.60-b09, mixed mode, sharing)

=== Build Information ===

Release ID: 507010015
Git revision: ce24e991948c7f3d88b0194a14fc1996d848ef51
Build date: 2015-01-26 14:31:20-05
Xamarin addins: 6895e3222bfa6910524708aa0633ff3db99bc3a0

=== Operating System ===

Windows 6.2.9200.0 (64-bit)