您的位置:首页 > 其它

使用ADO.NET DbContext Generator出现错误—Unable to locate file

2012-04-01 10:50 501 查看
如果在使用ADO.NET DbContext Generator生成类时出现如下错误:

Running transformation: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Unable to locate file

这是因为没有正确使用,使用ADO.NET DbContext Generator生成类的正确方法是:

1)打开*.edmx文件,右键单击,选择“添加代码生成项”:





2)然后选择“代码”—“ADO.NET DbContext Generator”,自己再命一个名称后点击“添加”:





现在就正确的生成了所有的简化类。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐