Search code examples
visual-studio-2010entity-framework-5data-annotations.net-4.5

System.ComponentModel.DataAnnotations.Schema not found in VS2010


I'm trying to use EntityFramework 5 (not 4.4, because I want to use some new features - enum support, spatial types, etc.) with Visual Studio 2010 on the machine with .NET 4.5 installed.

To configure my domain classes with DataAnnotations I've referenced System.ComponentModel.DataAnnotations.dll (v 4.0.30319 - this version is definitely from .NET 4.5 as far as I know)

But I can't include System.ComponentModel.DataAnnotations.Schema namespace from it (it's also not visible in Object Browser).

So I'm in deadlock...

Is there some kind of trick or it is completely impossible to code such way?

P.S. VS 2012 is not a solution because my company is stuck with VS 2010 for a long period of time.


Solution

  • Well, I've found some good news on MSDN ADO .NET Blog

    Enums, Spatial and Better Performance on .NET 4.0 - By moving the core components that used to be in the .NET Framework into the EF NuGet package we are now able to offer enum support, spatial data types and the performance improvements from EF5 on .NET 4.0.

    So it looks like EF6 Alpha 3 and newer will bring some major features for .NET 4.0 (which EF 4.4 for .NET 4.0 was lack of in coparisson with EF 5 for .NET 4.5).

    Great!. It is what I was looking for..