Browse Source

Fix Asset DLL loading on non-iOS platforms that I broke.

Jason Jarvis 9 years ago
parent
commit
309dabe0c2
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/Shared/PlatformSupport/AssetLoader.cs

+ 8 - 0
src/Shared/PlatformSupport/AssetLoader.cs

@@ -67,7 +67,15 @@ namespace Perspex.Shared.PlatformSupport
                 var match = loadedAssemblies.FirstOrDefault(a => a.GetName().Name == name);
                 if (match != null)
                 {
+                    AssemblyNameCache[name] = rv = new AssemblyDescriptor(match);
+                }
+                else
+                {
+                    // iOS does not support loading assemblies dynamically!
+                    //
+#if !__IOS__
                     AssemblyNameCache[name] = rv = new AssemblyDescriptor(Assembly.Load(name));
+#endif
                 }
             }