The first official release of T4RIA

by Petr Hošek

During the Rapid RIA development using .NET presentation, we have presented our own T4 template for WCF RIA Service called T4RIA. T4RIA is a T4 template that generates domain services, metadata and localization for WCF RIA Services from ADO.NET Entity Data Model.

We have promised to release T4RIA under open-source license. Today, I would like to announce the first official release which is part of WCF RIA Contrib project. This project is a collection of tools for WCF RIA Services and therefore presents a perfect home for T4RIA.


T4RIA supports WCF RIA Services 1.0, ADO.NET Entity Framework 4.0 and requires T4 Toolbox for its run.

To use it, simply download the official zip file and copy both and T4RIA.settings.t4 to the root of your WCF RIA Services web application. You might need to customize the settings in T4RIA.settings.t4 to fit your environment and conventions. Then, by running (simply save the file or use Chirpy extension), you will generate all the necessary files.

The code in generated files can then be customized to fit your needs e.g. add additional domain service operations, add additional model metadata, localize your model.


To find out more about T4RIA, please visit the official page. To ask questions or make suggestions regarding improvements and new functionality, please use the official discussion.

Developers wishing to help are welcomed to join the effort. Source code can be obtained on CodePlex. For T4 templates development support in Visual Studio 2010, I recommend Visual T4 editor from Clarius. To learn more about T4 as well as T4 Toolbox, its usage and advanced techniques, read Oleg Sych's blog which contains many useful information.



Tags: Ria, Ria Services, T4ria, T4


  • Leo said

    When i try to run T4RIA, I got this error: :(

    Error 1 Running transformation: System.InvalidOperationException: Sequence contains more than one matching element
    at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
    at Microsoft.VisualStudio.TextTemplatingCCFF1DA58DEA78B359C12D2B7DD91082.GeneratedTextTransformation.EntityGenerator.LoadModel() in c:\Project\RIA\DB.RIA\ 493
    at Microsoft.VisualStudio.TextTemplatingCCFF1DA58DEA78B359C12D2B7DD91082.GeneratedTextTransformation.EntityGenerator.Validate() in c:\Project\RIA\DB.RIA\ 508
    at Microsoft.VisualStudio.TextTemplatingCCFF1DA58DEA78B359C12D2B7DD91082.GeneratedTextTransformation.ServiceGenerator.Validate() in c:\Project\RIA\DB.RIA\ 369
    at T4Toolbox.Generator.Run()
    at Microsoft.VisualStudio.TextTemplatingCCFF1DA58DEA78B359C12D2B7DD91082.GeneratedTextTransformation.TransformText() in c:\Project\RIA\DB.RIA\ 38
    at Microsoft.VisualStudio.TextTemplating.TransformationRunner.RunTransformation(TemplateProcessingSession session, String source, ITextTemplatingEngineHost host, String& result) 1 1

  • Petr Hošek said

    Thank you very much for the bug report, I will try to fix this as soon as possible. May I ask you to add this issue to the official Issue Tracker at CodePlex to allow better tracking? Would it be also possible to share your ADO.NET data model to allow easier debugging of this issue?

Add a Comment