The default target Entity Framework version requires the edmx schema version 2.0.0.0 or lower. The specified schema is version 3.0.0.0

StackOverflow https://stackoverflow.com/questions/14757589

  •  07-03-2022
  •  | 
  •  

سؤال

I'm pre-generating views in Entity Framework 5.0 with the EdmGen.exe as it follows:

"%windir%\Microsoft.NET\Framework\v4.0.30319\EdmGen.exe" 
/nologo 
/mode:ViewGeneration 
/inssdl:"$(TargetDir)Base.ssdl" 
/incsdl:"$(TargetDir)Base.csdl" 
/inmsl:"$(TargetDir)Base.msl" 
/outviews:"$(ProjectDir)BaseViews.cs" 
/language:CSharp

The warning detail:

Warning 3 The default target Entity Framework version requires the edmx schema version 2.0.0.0 or lower. The specified schema is version 3.0.0.0. To avoid this warning specify the target Entity Framework version explicitly. You can do this by using the EdmGen.exe command-line tool with the targetVersion option, or by including the targetEntityFrameworkVersion parameter when calling the GenerateCode method.

Any idea of how to solve this issue?

هل كانت مفيدة؟

المحلول

You need to add /targetversion:4.5 to EdmGen

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top