Commit 60b78072 authored by Nick Craver's avatar Nick Craver

Fix SQL spatial type loading

parent 15c9e35a
...@@ -57,10 +57,10 @@ ...@@ -57,10 +57,10 @@
<PropertyGroup> <PropertyGroup>
<PostBuildEvent> <PostBuildEvent>
if not exist "$(MSBuildProjectDirectory)\SqlServerTypes\x86" md "$(MSBuildProjectDirectory)\SqlServerTypes\x86" if not exist "$(TargetDir)x86" md "$(TargetDir)x86"
xcopy /s /y /q "$(NuGetPackageRoot)\Microsoft.SqlServer.Types\14.0.314.76\NativeBinaries\x86\*.*" "$(MSBuildProjectDirectory)\SqlServerTypes\x86" xcopy /s /y /q "$(NuGetPackageRoot)\Microsoft.SqlServer.Types\14.0.314.76\NativeBinaries\x86\*.*" "$(TargetDir)x86"
if not exist "$(MSBuildProjectDirectory)\SqlServerTypes\x64" md "$(MSBuildProjectDirectory)\SqlServerTypes\x64" if not exist "$(TargetDir)x64" md "$(TargetDir)x64"
xcopy /s /y /q "$(NuGetPackageRoot)\Microsoft.SqlServer.Types\14.0.314.76\NativeBinaries\x64\*.*" "$(MSBuildProjectDirectory)\SqlServerTypes\x64" xcopy /s /y /q "$(NuGetPackageRoot)\Microsoft.SqlServer.Types\14.0.314.76\NativeBinaries\x64\*.*" "$(TargetDir)x64"
</PostBuildEvent> </PostBuildEvent>
</PropertyGroup> </PropertyGroup>
</Project> </Project>
...@@ -31,11 +31,11 @@ public static void LoadNativeAssemblies(string rootApplicationPath) ...@@ -31,11 +31,11 @@ public static void LoadNativeAssemblies(string rootApplicationPath)
if (!_nativeAssembliesLoaded) if (!_nativeAssembliesLoaded)
{ {
var nativeBinaryPath = IntPtr.Size > 4 var nativeBinaryPath = IntPtr.Size > 4
? Path.Combine(rootApplicationPath, @"SqlServerTypes\x64\") ? Path.Combine(rootApplicationPath, @"x64\")
: Path.Combine(rootApplicationPath, @"SqlServerTypes\x86\"); : Path.Combine(rootApplicationPath, @"x86\");
Console.Write("(from: " + nativeBinaryPath + ")...");
LoadNativeAssembly(nativeBinaryPath, "msvcr100.dll"); LoadNativeAssembly(nativeBinaryPath, "msvcr120.dll");
LoadNativeAssembly(nativeBinaryPath, "SqlServerSpatial110.dll"); LoadNativeAssembly(nativeBinaryPath, "SqlServerSpatial140.dll");
_nativeAssembliesLoaded = true; _nativeAssembliesLoaded = true;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment