As Jason Zander and Cameron have announced, we've just released the first Feature Pack for Visual Studio 2010, the Visualization and Modeling Feature Pack.

This pack is available to all MSDN subscribers and among a host of other great features, adds T4-based code generation to our UML static class diagrams.

 

UML class diagram and generated C# class files.

 

This add-in works with the C# profile that we shipped with Visual Studio to generate code.

It's a great example of how you can rather easily build a profile yourself to add yet more metadata to your UML model and enrich the code generation further.

You can find all the detail on editing and customizing the templates here: http://msdn.microsoft.com/library/ff657795.aspx

Enjoy.