SqlServerSpatial110.dll failed to copy on Windows Azure deployment

岁酱吖の 提交于 2019-12-23 04:53:29

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!