“Microsoft.SqlServer.Types”10或更高版本不能在Azure上找到 [英] 'Microsoft.SqlServer.Types' version 10 or higher could not be found on Azure

查看:1908
本文介绍了“Microsoft.SqlServer.Types”10或更高版本不能在Azure上找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图做一个在的WebAPI的ASP.NET MVC 4中使用Entity Framework的5种空间的的WebAPI,我已经写了一个很简单的code。

I'm trying to make a webapi in ASP.NET MVC 4. The webapi used Entity Framework 5 Spatial types and i have wrote a very simple code.

  public List<Area> GetAllAreas()
    {
        List<Area> aList = db.Areas.ToList();
        return aList;
    }

区包含DbGeometry。

Area contains DbGeometry.

当我运行这个地方它的工作原理,但是当我发布到Azure它给了我这个错误:

When i run this local it works, but when i publish it to azure it gives me this error:

空间类型和功能不适用于该供应商是因为程序集Microsoft.SqlServer.Types10或更高版本找不到。

Spatial types and functions are not available for this provider because the assembly 'Microsoft.SqlServer.Types' version 10 or higher could not be found.

任何人知道如何解决这个问题? :)

Anyone know how to resolve this ? :)

谢谢!

推荐答案

我找到了解决办法!只需安装的NuGet包Windows.SqlServer.Types

I found the solution ! Just install the nuget package Windows.SqlServer.Types

PM>安装封装Microsoft.SqlServer.Types

PM> Install-Package Microsoft.SqlServer.Types

<一个href=\"http://blogs.msdn.com/b/adonet/archive/2013/12/09/microsoft-sqlserver-types-nuget-package-spatial-on-azure.aspx)\"相对=nofollow>链接获取更多信息

这篇关于“Microsoft.SqlServer.Types”10或更高版本不能在Azure上找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆