Turns out it was simply a matter of having the correct files in the bin dir and an entry in web config. Here's the list of files:
- Microsoft.Web.Infrastructure.dll
- NuGet.Core.dll
- System.Web.Helpers.dll
- System.Web.Razor.dll
- System.Web.WebPages.Administration.dll
- System.Web.WebPages.Deployment.dll
- System.Web.WebPages.dll
- System.Web.WebPages.Razor.dll
and here's what I needed in web.config:
<compilation>
<assemblies>
<add assembly="System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</assemblies>
<buildProviders>
<add extension=".cshtml" type="System.Web.WebPages.Razor.RazorBuildProvider, System.Web.WebPages.Razor"/>
</buildProviders>
</compilation>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…