Eu sou capaz de carregar e acessar resx em Simulator constrói do meu iPhone app construído usando MonoTouch. A entrada do arquivo resx no arquivo csproj se parece com:
<ItemGroup>
<EmbeddedResource Include=MapMenu\Resources\MapMenu.resx>
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>MapMenu.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
O arquivo .resx em si tem uma entrada como esta:
<data name=Main_Menu type=System.Resources.ResXFileRef, System.Windows.Forms>
<value>Main Menu.mm;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
eo arquivo MapMenu.Designer.cs gerado tem o seguinte:
internal static string Main_Menu {
get {
return ResourceManager.GetString(Main_Menu, resourceCulture);
}
}
Como mencionado acima, chamando o acessor MAIN_MENU funciona bem no simulador. No dispositivo, no entanto, ela produz:
<Notice>: Unhandled Exception: System.MissingMethodException: No constructor found for System.Resources.RuntimeResourceSet::.ctor(System.IO.UnmanagedMemoryStream)
<Notice>: at System.Activator.CreateInstance (System.Type type, BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x00000] in <filename unknown>:0
<Notice>: at System.Activator.CreateInstance (System.Type type, System.Object[] args, System.Object[] activationAttributes) [0x00000] in <filename unknown>:0
<Notice>: at System.Activator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in <filename unknown>:0
<Notice>: at System.Resources.ResourceManager.InternalGetResourceSet (System.Globalization.CultureInfo culture, Boolean createIfNotExists, Boolean tryParents) [0x00000] in <filename unknown>:0
<Notice>: at System.Resources.ResourceManager.GetString (System.String name, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
<Notice>: at MapMenu.Resources.MapMenu.get_Main_Menu () [0x00000] in <filename unknown>:0
Fez algumas checagens, e estou querendo saber neste momento se isso realmente está faltando funcionalidade em Monotouch.
Obrigado,