MissingManifestResourceException on Windows Phone 8.1 with .resx resources

后端 未结 4 2117
野性不改
野性不改 2021-02-07 11:59

I\'m developing a Windows Phone 8.1 app that also targets Android(Xamarin)

As ever I added my string resources(.resx) on a PCL and referenced them on my launcher project

4条回答
  •  孤城傲影
    2021-02-07 12:25

    I am able to reproduce this issue launching DVD sample and unfortunately in my project. I have an WP Silverlight 8.1 project registering a Windows Runtime Component Background Task and both of them using a Portable Class Library sharing some common localized strings as resources (.resx), among other things. The exception is thrown from Background Task when calling any property to get strings on generated .Design.cs class (only Release + Device).

    In order to fix this I tried, without success, to use directly ResourceManager and/or to add .resx files directly into the Background Task.

    I ended-up porting needed strings to .resw files and use the new "WinRT preferred" way via Windows.ApplicationModel.Resources.ResourceLoader in the Background Task project.

    Seems to me that ResourceManager is not compatible with Windows Runtime anymore in release.

    This is not necessary an answer, but is better than nothing since I do not have 50 reputation points for a comment.

提交回复
热议问题