空间类型和函数不适用于此提供程序,因为程序集 'Microsoft.SqlServer.Types'
Spatial types and functions are not available for this provider because the assembly 'Microsoft.SqlServer.Types'
Windows最近蓝屏,自己重装了。结果我不得不重新安装我所有的开发工具。我有 VS 2015,现在正在使用 VS 2017
我在尝试 运行 以前工作的 .NET 4.6 Web 应用程序时遇到此错误
Spatial types and functions are not available for this provider
because the assembly Microsoft.SqlServer.Types
version 10 or higher
could not be found.
我在网上找到的解决办法是运行
Install-Package Microsoft.SqlServer.Types
包裹内含说明:
ASP.NET 应用程序 对于 ASP.NET 应用程序,将以下代码行添加到 Global.asax.cs
中的 Application_Start
方法: SqlServerTypes.Utilities.LoadNativeAssemblies(Server.MapPath("~/bin"));
我试图将该行添加到我的 Global.asax.vb
(这是 vb.net 项目)
Intellisense 以红色下划线 SqlServerTypes
,并且不提供 using 语句作为建议。
SqlServerTypes
在哪个命名空间下?如果那是最上面的 Namespace
那么为什么安装 nuget 包后它不能识别它?
编辑 - None 我在网上找到的解决方案对我有用。我尝试在我的机器上安装 SQL 2016 CLR 类型以及建议的 nuget 包并将 .cs 转换为 .vb
我确实通过安装我找到的这个 Nuget 包解决了问题
安装包 HashFoo.SqlServer.SpatialTypes
Install-Package HashFoo.SqlServer.SpatialTypes 帮我修好了。
Windows最近蓝屏,自己重装了。结果我不得不重新安装我所有的开发工具。我有 VS 2015,现在正在使用 VS 2017
我在尝试 运行 以前工作的 .NET 4.6 Web 应用程序时遇到此错误
Spatial types and functions are not available for this provider because the assembly
Microsoft.SqlServer.Types
version 10 or higher could not be found.
我在网上找到的解决办法是运行
Install-Package Microsoft.SqlServer.Types
包裹内含说明:
ASP.NET 应用程序 对于 ASP.NET 应用程序,将以下代码行添加到 Global.asax.cs
中的 Application_Start
方法: SqlServerTypes.Utilities.LoadNativeAssemblies(Server.MapPath("~/bin"));
我试图将该行添加到我的 Global.asax.vb
(这是 vb.net 项目)
Intellisense 以红色下划线 SqlServerTypes
,并且不提供 using 语句作为建议。
SqlServerTypes
在哪个命名空间下?如果那是最上面的 Namespace
那么为什么安装 nuget 包后它不能识别它?
编辑 - None 我在网上找到的解决方案对我有用。我尝试在我的机器上安装 SQL 2016 CLR 类型以及建议的 nuget 包并将 .cs 转换为 .vb
我确实通过安装我找到的这个 Nuget 包解决了问题 安装包 HashFoo.SqlServer.SpatialTypes
Install-Package HashFoo.SqlServer.SpatialTypes 帮我修好了。