Using Application.GetResourceStream in Silverlight tests looks in StatLight XAP


When Application.GetResourceStream is called from a Silverlight test, it will look in the StatLight host XAP rather than in the XAP file being tested. Can StatLight support running Silverlight unit tests directly, rather than hosting the tests XAP in a StatLight host XAP? Or maybe an easier solution, can the test itself detect if it's running under StatLight and get a StreamResourceInfo representing it's XAP file?
Closed Mar 16, 2011 at 3:12 PM by staxmanade
No response


staxmanade wrote Jan 18, 2011 at 3:01 AM

Could you describe your scenario a little better and why you are pulling things out through the StreamResourceInfo in a test? For now, unfortunatley there is no easy way to do what you're asking regarding stream resources.

staxmanade wrote Mar 13, 2011 at 5:43 PM

FYI: I think this should work for you now (with what's up on StatLight master). StatLight now re-writes the xap and pulls all xap under test assemblies and other files into the host xap. So this should now work.

Could you please confirm this is true with what you needed it for?

wrote Mar 16, 2011 at 3:12 PM

wrote Feb 14, 2013 at 9:18 PM

wrote May 16, 2013 at 10:50 AM