Question: Unable to load Resources

Sep 20, 2011 at 5:35 PM

I have duplicated my app.xaml in the silverlight test project, when I use the browser test runner they are found, but when I run through resharper 6 (agunit) the app.xaml resources are not found. Do I need to put them somewhere special?




Sep 21, 2011 at 10:19 AM
Edited Sep 21, 2011 at 10:20 AM

I don't think the App.xaml is ever loaded.
This is done by the Statlight runner. So you might have more luck searching it's codeplex and github pages: and 

We usually try to avoid using styles, but if we do, we use an AssemblyInitialize fixture (MSTest). Example:

    public class StylesSetup
        public void Setup_StyleManager()

        private void RegisterStyles<T>(string stylesPath)
            var uri = new Uri(string.Format("/{0};component/{1}", typeof(T).Namespace, stylesPath), UriKind.RelativeOrAbsolute);

            Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary { Source = uri });

        public void StyleSetup_EmptyTest()
        { }