[mapguide-commits] r8835 - in sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi: . Custom runtimes

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Wed Nov 18 09:47:45 PST 2015


Author: jng
Date: 2015-11-18 09:47:45 -0800 (Wed, 18 Nov 2015)
New Revision: 8835

Added:
   sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/runtimes/win7-x64/
   sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/runtimes/win7-x86/
Removed:
   sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/runtimes/win-x64/
   sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/runtimes/win-x86/
Modified:
   sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/Custom/EntryPoint.cs
   sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/project.json
Log:
Revert back to the dnxcore50 TFM. Also modify the native packaging paths. Tests show that with these paths, there is no need for custom native library loading that we currently do with the MapGuideApi static constructor

Modified: sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/Custom/EntryPoint.cs
===================================================================
--- sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/Custom/EntryPoint.cs	2015-11-18 15:33:50 UTC (rev 8834)
+++ sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/Custom/EntryPoint.cs	2015-11-18 17:47:45 UTC (rev 8835)
@@ -17,7 +17,6 @@
 using System;
 using System.IO;
 using System.Reflection;
-using Microsoft.Extensions.PlatformAbstractions;
 
 namespace OSGeo.MapGuide
 {
@@ -28,20 +27,7 @@
     {
         static MapGuideApi()
         {
-            var plat = PlatformServices.Default;
-            if (plat != null)
-            {
-                var lib = plat.LibraryManager.GetLibrary("MapGuideDotNetCoreApi");
-                var asmContext = plat.AssemblyLoadContextAccessor?.Default;
-                if (asmContext != null)
-                {
-                    var arch = IntPtr.Size == 4 ? "x86" : "x64";
-                    var libName = "MapGuideDotNetCoreUnmanagedApi";
-                    var libPath = Path.Combine(lib.Path, $"../../runtimes/win-{arch}/native/{libName}.dll");
-
-                    asmContext.LoadUnmanagedLibraryFromPath(libPath);
-                }
-            }
+            
         }
         
         /// <summary>

Modified: sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/project.json
===================================================================
--- sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/project.json	2015-11-18 15:33:50 UTC (rev 8834)
+++ sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/project.json	2015-11-18 17:47:45 UTC (rev 8835)
@@ -19,7 +19,7 @@
     }
   },
   "frameworks": {
-    "dotnet5.4": {
+    "dnxcore50": {
       "dependencies": {
         "Microsoft.CSharp": "4.0.1-beta-23409",
         "System.Collections": "4.0.11-beta-23409",
@@ -27,8 +27,7 @@
         "System.Runtime": "4.0.21-beta-23409",
         "System.Threading": "4.0.11-beta-23409",
         "System.Runtime.Extensions": "4.0.11-beta-23409",
-        "System.Runtime.InteropServices": "4.0.21-beta-23409",
-        "Microsoft.Extensions.PlatformAbstractions": "1.0.0-rc2-16127" 
+        "System.Runtime.InteropServices": "4.0.21-beta-23409"
       }
     }
   },
@@ -36,7 +35,6 @@
     "compile": ["*.cs", "Custom/*.cs"]
   },
   "packInclude": {
-    "runtimes/win-x64/native/": "runtimes/win-x64/native/*",
-    "runtimes/win-x86/native/": "runtimes/win-x86/native/*"
+    "runtimes/": "runtimes/**"
   }
 }
\ No newline at end of file



More information about the mapguide-commits mailing list