问题
I have an exsting which is deployed on Windows Azure. But the deployment has been failed with following error. How to fix his
Copying file SqlServerTypes\x64\SqlServerSpatial110.dll to C:\DWASFiles\Sites\<project>\Temp\b3d105f6-8fd0-4093-9957-8174422abded\SqlServerTypes\x64\SqlServerSpatial110.dll failed. Could not find file 'SqlServerTypes\x64\SqlServerSpatial110.dll'.
How do I fix this issue?
回答1:
I had this problem recently and found this blog post that solved it for me: http://blogs.msdn.com/b/adonet/archive/2013/12/09/microsoft-sqlserver-types-nuget-package-spatial-on-azure.aspx
Effectively the solution is to add a NuGet package called Microsoft.SqlServer.Types
to your project. This package comes with a readme that explains what you need to do and it's very straightforward.
回答2:
Installing NuGet package Microsoft.SqlServer.Types
solved the problem.
But remember also to add this line before calling any spatial operation:
SqlServerTypes.Utilities.LoadNativeAssemblies(AppDomain.CurrentDomain.BaseDirectory);
This is explained inside readme.htm
after installing NuGet package.
来源:https://stackoverflow.com/questions/21887497/sqlserverspatial110-dll-failed-to-copy-on-windows-azure-deployment