A while ago Julie blog posted tutorial on how to use VS 2010 beta POCO T4 templates in VS2010 RC. While I found that post very helpful I had hard time following it and after a bit of playing I think I found easier way how to get POCO template working:
Here are n simple steps:
- Go to Announcing the Entity Framework POCO Template update for Visual Studio 2010 Beta 2 and download the attached zip file (or click here)
- Unpack it anywhere
- Run the C# and\or VB installer
- Open Visual studio 2010 RC
- Add a POCO template (New Item\Code\ADO.NET POCO Entity Generator
Open the Model TT file being generated by T4 (No need to do anything in *.Context.tt file)
Update L15 of the generated file to be
EntityFrameworkTemplateFileManager fileManager = EntityFrameworkTemplateFileManager.Create(this);
Original content:TemplateFileManager fileManager = TemplateFileManager.Create(this);
Update L678 of the generated file to be
fileManager.Process();
It is originally fileManager.WriteFiles();
And voila – your T4 template is operational without the need to copy anything, no need for VS2010 b2 image files.
Please let me know (here on blog or on twitter @malovicn) if you would have any problems with this steps
Technorati Ознаке:
EF4,
POCO