MissingManifestResourceException on Windows Phone 8.1 with .resx resources

后端 未结 4 2119
野性不改
野性不改 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

    Our team ran into a similar issue which was tracked down to the runtime and not the PCL, WinRT component, or application package. That is, the resources exist within the PCL assembly, within the application package resources.pri file, but just cannot be found at runtime.

    There is an active Microsoft Connect report here:

    https://connect.microsoft.com/VisualStudio/feedback/details/991028/issue-using-resx-files-on-winrt-apps-windows-phone-and-windows

    Our workaround was for the WinRT component to inject into each generated Resources class of each referenced PCL our own derived ResourceManager which redirected the call to the WinRT ResourceLoader instead. I've written a blog post that describes that workaround:

    http://blogs.msdn.com/b/philliphoff/archive/2014/11/19/missingmanifestresourceexception-when-using-portable-class-libraries-in-winrt.aspx

提交回复
热议问题