MSDN Archive Home
Help and FAQs
All Resource Updates
Change History (all pages)
Resource Page Description
A command-line tool for the Microsoft Entity Framework. This tool is able to read and write the EDMX file format, as well as translate between EDMX and CSDL, SSDL & MSL file formats. It can be used as a replacement for the EdmGen.exe tool that ships with the .Net Framework 3.5.
**Delete the following note before publishing **
This resource page is currently in setup mode and only available to coordinators and developers. Once you have finished setting up your resource page you can publish it to make it available to all MSDN Code Gallery visitors.
To get your Resource Page ready to publish, you should do the following:
Make any changes to the details of your resource page
Here you can enable or disable functions of your resource page. You might want to turn on the Issue Tracker to allow users to provide feedback on your resource, or if you have a resource that does not involve a code sample, you may want to turn off the Releases tab.
Make sure your resource page description is detailed enough to let people search for your resource.
Add your code sample or other resources to the resource page
If you’re uploading code, go to the Releases tab and create a new release to house your code. Creating a release allows you to have the license properly displayed when people download your code, as well as provides a download count.
Edit your Wiki page to attach any resources you may have that are not source code.
If you want to let someone see your resource page before it is published, go to the People tab and add them to your resource page
This will let you add other team members who may be contributing to your resource, or just show it off and get feedback from someone you trust.
Tag your resource page with descriptive tags to make it easier for people to find your resources when browsing the gallery.
Publish your resource page so it becomes visible to everyone!
Additional information on starting a new resource page is available here:
Resource Page Startup Guide
Jun 20 2008 at 7:54 PM
, version 2
Jun 21 2008 at 4:53 PM
I think your description would be clearer if your second sentence read: "It can be used as a replacement for the original EdmGen.exe tool, which ships with the .Net Framework 3.5 and only reads and writes CSDL, SSDL and MSL files (not EDMX files).
Jun 26 2008 at 9:26 PM
Thanks Roger. I updated the description a bit. I hope it is more clear.
Nov 25 2008 at 1:09 PM
You probably want to modify the code so it allows for data provider to report warnings. Don't exit if all you get when generating is EdmSchemaErrorSeverity.Warning. I'm using Npgsql as provider and had to modify your code to skip warnings. This is a great tool, thanks.
May 27 2009 at 7:48 PM
Does not support namespaces, a.k.a. useless! , I have spent 4 hours writing a script, and then found that I cannot use namespaces, so again, what is the point of the tool?
Oct 30 2009 at 3:38 PM
Thanks "void" for the comment. I was stuck at the same problem.
I wrote a method called "HasErrors" for the EdmGen2 class.
private static Boolean HasErrors(IEnumerable<EdmSchemaError> errors)
if (errors == null)
Boolean errorFound = false;
foreach (EdmSchemaError error in errors)
if (error.Severity == EdmSchemaErrorSeverity.Warning) continue;
errorFound = true;
Find line number 150 and add a line "if (HasErrors(ssdlErrors))" before "return" so the result would be:
// write out errors
if ((ssdlErrors != null && ssdlErrors.Count > 0))
System.Console.WriteLine("Error/warning(s) occurred during generation:");
Compile and run and that is IT!
A hint for NPgSQL users by PgFoundry.org. If you got flooded by the warnings as I did (almost 2k lines) at the CMD window, direct the output to a file like this:
edmgen2.exe /ModelGen <connection string> <provider name> <model name> >> output.txt
You will find the "output.txt" from the same directory as the edmgen2.exe with all the content. Also it is faster then writing warnings on the screen.
Aug 5 2013 at 11:30 AM
Doesn't work. Not generate views and XXXModel.Designer.cs
Sign in to add a comment
EdmGen2 (version 1.0.2...
Tue Apr 20 2010 at 7:00 AM
More Tags ...
Visual Studio 2005
Visual Studio 2008
Visual Studio 2010
Manage Your Profile
MSDN Flash Newsletter
© 2008 Microsoft Corporation. All rights reserved.