Bug 51306 - My Android Resource.designer.cs file will not update
Summary: My Android Resource.designer.cs file will not update
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 6.1.2 (C7SR1)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
Depends on:
Reported: 2017-01-09 16:24 UTC by agichuru
Modified: 2017-08-23 21:10 UTC (History)
4 users (show)

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

File contains the Xamarin version details and build info (194.08 KB, application/x-iwork-pages-sffpages)
2017-01-09 16:24 UTC, agichuru

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 on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description agichuru 2017-01-09 16:24:40 UTC
Created attachment 19131 [details]
File contains the Xamarin version details and build info

My Android Resource.designer.cs file will not update. I have tried steps defined in: https://developer.xamarin.com/guides/android/troubleshooting/questions/resource-designer-wont-update/
but nothing works. the same happened to me in Visual Studio for MAC. But there i was able to delete the Resource.Designer.cs file and when it was regenrated it was fine.
Comment 1 arvind.joshi 2017-05-05 19:09:18 UTC
I am facing the same problem with Xamarin Studio version 6.3 (build 683). Suddenly the Resource.designer.cs stops updating. I have identified a couple of times that it happens: 
1. If I copy-paste UI code (.axml) from outside e.g. some sample from the web, some times some weird characters end up in the editor. When the .axml is saved the generation of Resource.designer.cs fails and then onwards none of the changes I make are reflected.
2. If I select "Remove" option for an element (say from the drawable folder) and the on the dialog that is shown I select "Delete" instead of "Remove from project". When the item is deleted, the Resource.designer.cs is not instructed to remove it. Then the next time some change is done, the Resource.designer.cs does not get updated.

There is some other cause but I have not been able to identify it. However, the problem is that when that happens, none of the other options that I have found on various forums help. The .csprj is fine, deleting the Resource.designer.cs generates only a new empty file etc.

So what we need as long term fix is the ability to explicitly create Resource.designer.cs when it won't update automatically. Urgently need a solution to do that. In the last 3 days I have lost 10 hours due to this issue. So much so that I am taking a local backup every time I have some functionality working. That way I have a version to go back to.
Comment 2 arvind.joshi 2017-05-08 14:26:45 UTC
@agichuru@gmail.com, any update on this from Xamarin? Were you able to get this issue  resolved?
Comment 3 Tom Opgenorth 2017-06-25 21:21:05 UTC
Thank you for taking the time to submit the bug. We are unable to reproduce this issue. Please attach a reproduction to the bug by starting with a clean Xamarin.Android project and adding just the code necessary to demonstrate the issue.
Comment 4 Cody Beyer (MSFT) 2017-08-23 21:10:45 UTC
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!