我使用 EdmGen.exe 在 Entity Framework 5.0 中预生成 View ,如下所示:
"%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
警告详情:
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.
知道如何解决这个问题吗?
最佳答案
你需要添加 /targetversion:4.5
到 EdmGen
关于entity-framework - 默认目标 Entity Framework 版本需要 edmx 架构版本 2.0.0.0 或更低版本。指定的架构是版本 3.0.0.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14757589/