Question

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

  • Target framework .Net 4.5
  • Class library project

After adding an empty model I get the error below

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?)

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

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

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

Was it helpful?

Solution

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.

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top