Home Ask Login Register

Developers Planet

Your answer is one click away!

lukya February 2016

Xamarin auto generated AppResources.Designer.cs does not take subfolder name in ResourceManager baseName

I am working on iOS + Android project in Xamarin (not xamarin-forms). The app needs to support multiple languages and localization is working correctly using AppResources files.

For clean code setup and better management, AppResources files are stored inside Resx directory within core project base directory.

On updating AppResources.resx file, Xamarin automatically recreates AppResources.Designer.cs file in the same directory in which ResourceManager is created with base name ProjectName.AppResources

System.Resources.ResourceManager temp = new System.Resources.ResourceManager("ProjectName.AppResources", typeof(AppResources).GetTypeInfo().Assembly);

However, since all app resources are stored under Resx folder, i'd like ResourceManager to be created with base name ProjectName.Resx.AppResources

What changes shuld i make sure AppResources.Designer.cs file creation takes into account the correct folder / namespace path?


lukya February 2016

This is a known issue reported on Xamarin bugzilla.

Fixed this by changing the Resource Id of resource files from ProjectName.Rexx.AppResources.resources to ProjectName.AppResources.resources in the files properties pane.

Post Status

Asked in February 2016
Viewed 3,227 times
Voted 4
Answered 1 times


Leave an answer

Quote of the day: live life