使用Visual Studio 11 Beta .Net 4.5的Edmx文件 [英] Edmx file with Visual Studio 11 Beta .Net 4.5

查看:103
本文介绍了使用Visual Studio 11 Beta .Net 4.5的Edmx文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法使用Visual Studio 2011 beta版创建新的edmx文件

I am having trouble creating a new edmx file using Visual Studio 2011 beta


  • 目标框架.net 4.5

  • 类库项目

添加空模型后,出现以下错误

After adding an empty model I get the error below


错误6039:警告CS1701:假定程序集引用
'System.Data.Entity,Version = 4.0.0.0,Culture = neutral,
PublicKeyToken = b77a5c561934e089 '匹配'System.Data.Entity,
Version = 4.2.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089',
您可能需要提供运行时策略\fjwflppr.0.cs(465,29 ):错误
CS1061: System.Data.Metadata.Edm.EdmFunction不包含 IsComposableAttribute的
定义,也没有扩展方法
IsComposableAttribute接受第一个类型的参数
'System.Data.Metadata.Edm.EdmFunction'可以找到(您是否丢失了使用指令或程序集引用的
a?)

Error 6039: warning CS1701: Assuming assembly reference 'System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' matches 'System.Data.Entity, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089', you may need to supply runtime policy \fjwflppr.0.cs(465,29) : error CS1061: 'System.Data.Metadata.Edm.EdmFunction' does not contain a definition for 'IsComposableAttribute' and no extension method 'IsComposableAttribute' accepting a first argument of type 'System.Data.Metadata.Edm.EdmFunction' could be found (are you missing a using directive or an assembly reference?)

方法不是f ound:布尔值
System.Data.Metadata.Edm.EdmFunction.get_IsComposableAttribute()。

Method not found: 'Boolean System.Data.Metadata.Edm.EdmFunction.get_IsComposableAttribute()'.

根据 msdn EdmFunction.IsComposableAttribute仅在.net 4.5中受支持,并且该项目默认情况下引用 C:\Program Files(x86)\参考程序集\Microsoft\Framework\.NETFramework中的dll。 \v4.5\System.Data.Entity.dll ,但是vs中的文件属性窗口显示 4.0.0.0

According to msdn EdmFunction.IsComposableAttribute is only supported in .net 4.5 and the project by default references the dll from C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.Entity.dll but the file Properties window in vs is showing 4.0.0.0

我对我的项目应该引用哪个版本的System.Data.Entity.dll感到困惑,以使edmx设计器正常工作。

I am confused about which version of System.Data.Entity.dll my project should reference to get the edmx designer to work.

推荐答案

问题是因为EF CTP卸载未清除所有文件,它留下了绑定到旧版本 4.2.0.0的策略文件,因此VS始终看起来

The issue was because the EF CTP uninstall didn't clean all files, it left a policy file which had binding to the old version "4.2.0.0", so VS will always look for that old version.

此处有$ b的详细信息$ b https://stackoverflow.com/a/9665596/1261784

details here https://stackoverflow.com/a/9665596/1261784

这篇关于使用Visual Studio 11 Beta .Net 4.5的Edmx文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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