在Azure上无法找到“Microsoft.SqlServer.Types”10或更高版本 [英] 'Microsoft.SqlServer.Types' version 10 or higher could not be found on Azure
问题描述
public List< Area> GetAllAreas()
{
列表< Area> aList = db.Areas.ToList();
return aList;
}
区域包含DbGeometry。
当空间类型和功能发生时,不可用于此提供程序,因为无法找到程序集Microsoft.SqlServer.Types10或更高版本。
任何人都知道如何解决这个问题?谢谢!
我找到了解决方案!只需安装nuget软件包Microsoft.SqlServer.Types
PM> Install-Package Microsoft.SqlServer.Types
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;
}
Area contains DbGeometry.
When i run this local it works, but when i publish it to azure it gives me this error:
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 ? :)
Thanks!
I found the solution ! Just install the nuget package Microsoft.SqlServer.Types
PM> Install-Package Microsoft.SqlServer.Types
这篇关于在Azure上无法找到“Microsoft.SqlServer.Types”10或更高版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!