8
Vote

Use ResourceLoader.GetForViewIndependentUse instead of ResourceLoader.GetForCurrentView

description

In the constructor of the generated Resources class, the ResourceLoader.GetForCurrentView() method is used to instantiate the resource loader. This method causes an exception with the message 'Resource Contexts may not be created on threads that do not have a CoreWindow.' when called by a non UI thread.

This is really inconvenient when used in library assemblies, when one has no control on which thread one's methods will be called on.

I believe the use of ResourceLoader.GetForViewIndependentUse would be more appropriate.

comments

rmatiazo wrote Feb 24, 2016 at 1:28 PM

Already fixed, there's any way to push the fix?

christianhelle wrote Feb 24, 2016 at 3:17 PM

That's awesome!

To push your change you will need to create a fork then a pull request from that. I will then approve and merge it to master