Imtech Get SPMetal Definition Extension – Now with support for Lists!
Development, Productivity, SharePoint 2010, Tools, Visual Studio 2010A few weeks ago I published an extension for the new Visual Studio SharePoint development tools that simplifies working with SPMetal. Upon installation the extension adds a menu to every Site node in SharePoint Explorer. Using that menu option you can generate the SPMetal definition just as if you would use the SPMetal command line interface itself.
While the extension worked correctly, the problem was that the generated definition contained classes for every single list in the given site: in most cases way more than you need – as fellow SharePoint MVP Scot Hillier pointed out. To fix this issue I extended the extension with support for SharePoint Lists.
In the new version 1.2 the extension also adds a menu item to every List allowing you to generate an SPMetal definition for that particular list only.
Thanks to Scot Hillier for the idea and feedback!
Download: Imtech Get SPMetal Definition Extension from Visual Studio Gallery or search for Imtech Get SPMetal Definition Extension from the Visual Studio Extension Manager.

















December 15th, 2009 at 1:53 pm
You\'re awesome Waldek.
Keep this up!
December 17th, 2009 at 5:22 pm
Works like a charm. No need for those bulky classes and clumsy batch files calling spmetal.
December 18th, 2009 at 8:31 am
@Randy: Thanks Randy! Great to hear that. Feel free to ping me should you have any suggestions/ideas about the extension.
April 19th, 2010 at 1:45 pm
@Waldek: Can you put in support for VB in your add-in. It's a great idea by the way!!!
April 19th, 2010 at 4:01 pm
@John: thanks for the feedback. It would be cool if you could add your feature request @ cksdev.codeplex.com, so that we can keep track of it there
November 12th, 2010 at 5:14 pm
I use it over and over again! Currently I'm working on a publishing solution and it turns out that columns like Scheduling Start Date or Scheduling End Date aren't picked up…tryin' to fix it.
November 13th, 2010 at 10:50 am
@Sander: As far as I know these are not the only field types that are not being picked up. If I'm not wrong SPMetal picks up only field types that ship with SharePoint Foundation, so everything else like Managed Metadata, Rich HTML, isn't there out of the box.
November 15th, 2010 at 8:22 pm
Waldek do you have a solution for bringing in managed metadata?
November 15th, 2010 at 10:35 pm
@Amanda Smith: This post might be useful: http://blogs.msdn.com/b/varun_malhotra/archive/2010/01/21/sp2010-spmetal-doesn-t-work-for-external-lists-possible-workaround.aspx
October 14th, 2011 at 1:01 am
any chance it could be enhanced to do publishing HTML columns?
October 14th, 2011 at 6:31 am
@sayitfast: I'm afraid it's a limitation in SPMetal itself rather than the extension I've made.