How do I execute ruby template files (ERB) without a web server from command line?

You should have everything you need in your ruby/bin directory. On my (WinXP, Ruby 1.8.6) system, I have ruby/bin/erb.bat erb.bat [switches] [inputfile] -x print ruby script -n print ruby script with line number -v enable verbose mode -d set $DEBUG to true -r [library] load a library -K [kcode] specify KANJI code-set -S [safe_level] set … Read more

Generate POCO classes in different project to the project with Entity Framework model

Actually the T4 templates in EF 4.0 were designed with this scenario in mind 🙂 There are 2 templates: One for the Entities themselves (i.e. ModelName.tt) One for the ObjectContext (i.e. ModelName.Context.tt) You should put the ModelName.tt file in you POCO project, and just change the template to point to the EDMX file in the … Read more

‘CompanyName.Foo’ is a ‘namespace’ but is used like a ‘type’

how do I tag Eric Lippert? If you have something you want brought to my attention you can use the “contact” link on my blog. I’m still utterly confused why the C# compiler bothers to check for collisions between namespaces and types in contexts where it makes no sense for a namespace to exist. Indeed, … Read more