We are a .NET shop (usually ASP.NET MVC) and we have a customer requirement for a static HTML site. As we have gone through this exercise the thing the only part of it that has gotten under my skin is the massive duplication that in a dynamic site we have many tricks for avoiding. Does anyone know of any libraries that would facilitate me developing my code in Razor or something similar, using partial views, master pages or similar tools but then be able to generate the output as a static HTML site.
I know that I could create a system to do so, but I have no need to recreate the wheel if others have already created it.
P.S.: I am not really interested in debating whether my customer SHOULD want a static site.
Sounds like you are looking for a template engine for Visual Studio.
I suggest looking at the built in one - T4.
You can use this to create your static HTML files.
Alternatively, take a look at embedding Razor, as Rick Strahl describes.
Or even T4 with Razor as described by Mikael Söderström.