views:

154

answers:

2

I've been playing around with NVelocity to create a library that loads mail templates. And I haven't been able to load a template without embedding it into the application assembly. Is there a special way of doing this? Properties to be specified?

I've tried several string formatting tweaks to get the path of the template and keep getting an exception of wrong path.

A: 

Check out: Template merging with NVelocity and ASP.NET

There is also a fork of NVelocity at: CodePlex which appears to be somewhat newer than both the original version and the castle fork.

Joe Caffeine
That's an old version. I'm working with the latest one from Castle Project.
Raúl Roa
+1  A: 

I just wrote a sample application for my own reference on how to implement various template loading methods - from embedded resources, from files and from in memory strings.

Take a look at my blog to download the source code for the console app: NVelocity demo app

Hope this helps,
Mihkel

Mihkel