Я могу загрузить и получить доступ к файлам resx в симуляторах сборки моего iPhone-приложения, построенного с использованием MonoTouch. Запись Resx файла в файле csproj выглядит следующим образом:MonoTouch: использование встроенных файлов resx на iPhone build
<ItemGroup>
<EmbeddedResource Include="MapMenu\Resources\MapMenu.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>MapMenu.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
сам .resx файл имеет такую запись:
<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>
и сгенерированный MapMenu.Designer.cs файл имеет следующее:
internal static string Main_Menu {
get {
return ResourceManager.GetString("Main_Menu", resourceCulture);
}
}
Как упоминалось выше, вызов устройства доступа Main_Menu отлично работает на симуляторе. На устройстве, однако, он производит:
<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
ли несколько вменяемости проверок, и мне интересно, в этот момент, если это действительно не хватает функциональности в MonoTouch.
Спасибо,