In Xamarin Android - How to regenerate the Resource.designer.cs
I tried to mark all the XML file\'s Build Action as \"AndroidResource\" and still the Resource.designer.c
In Visual Studio 2019, if you deleted Resources.Designer.cs, just right click "Resources.resx" file in solution explorer and choose "Run custom tool"
This will recreate the file.
"ResXFileCodeGenerator" must be set in Resources.resx file properties (but is set by default)
The generated Resources.designer.cs
class will be updated if you rebuild your project.
You can find this information at: http://docs.xamarin.com/guides/android/getting_started/hello%2C_world
It's easier than it seems...
http://docs.xamarin.com/recipes/android/general/projects/specify_default_namespace/
You can rename your project by using find/replace, but the resources file will use whatever is set for 'default namespace' in the Main Settings and will continue to revert to this name even if you manually edit the Resource.designer.cs file in or out of Xamarin.
As recently as Xamarin Studio 5.6 (build 273) with Xamarin.Android 4.18.0, if you have manually deleted the Resource.designer.cs
file from the project, rebuilding will regenerate Resource.designer.cs
, but will not add it back into the project. So after attempting to rebuild once, the file will be present in the file system, but not in the project. To fix this, manually add the newly generated file into the Resources folder in the project.
I faced the same issue in Visual Studio. The resource designer file is only generated when there is a change in the resource I applied following steps to generate the required resource.designer.cs file * Added a dummy image in the resources * Cleaned the project * Rebuild the project New resource.designer.cs generated.
It happened to me a few times, and every time the problem was not coming from the generation of the file itself, but from a malformed android resource. So if that happens after you merged something from your repository, double check your android resources (colors, strings, etc), for any malformed XML code.