EDMX .NET 4.5 to 4.0?

c# edmx edmx-designer entity-framework

Question

When our project was scheduled to build.NET 4.5, we constructed our EDMX utilizing the Entity Framework. Now that we wish to upgrade to.NET 4.0, we have compilation issues when we try to do so for the EDMX file.

The following error is stated:

Error 10027: The XML namespace for the conceptual model's schema element is not supported on this project's target framework version.

Is there any other option besides writing a new EDMX file?

1
4
9/10/2013 4:01:06 PM

Accepted Answer

In the event that you don't utilize the.NET Framework 4.5's enums, spatial types, or stored procedures with multiple result sets, you can perform the following (just in case, make a backup of the file):

  • Make a new console application that targets.NET Framework 4.5.
  • To the project, add the edmx file.
  • Project retargeting to.NET Framework 4 (go to project properties, change target framework version)

Your edmx should be upgraded to version 2 as a result of this.

A different option is to manually modify the xml namespaces and versions to v2. The namespace to use for each version of the artifact is specified here:

Edit Remember that Edmx v3 may now be used on.NET Framework 4, giving you access to all the benefits (such enums) that were previously only accessible on.NET Framework 4.5.

4
5/5/2014 2:23:23 AM

Popular Answer

ZZZ_tmp


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow