Using T4MVC (https://t4mvc.codeplex.com/) you must have HttpContext to resolve an URL in your application. So it won't work in a different thread for example. So I found this solution. I'm editing this by hand now, but I propose it as a new feature to integrate directly into T4MVC (https://t4mvc.codeplex.com/discussions/444764) .
One can now get an absolute URL of actions in a different thread and don't need an HttpContext nor UrlHelper .
I'm using this with FluentScheduler ( https://github.com/jgeurts/FluentScheduler ) for some background tasks like sending emails with RazorEngine and so.