-1

I've installed the .NET 4.5 framework using the dotNetFx45_Full_x86_x64.exe installer, and the ASPNET MVC4 framework using the AspNetMVC4Setup.exe installer in a Windows 2008 R2 server, yet I keep getting the message 'There is no build provider registered for the extension '.cshtml'.' while trying to run my ASPNET MVC4 app.

I've fixed this temporarily by adding a buildProviders section in my Web.config, but I would like to know how to setup a server so that I can use the current framework without having to touch my Web.config (the same way I can run them in my dev machine).

4

1 に答える 1

1

これは暗闇でのショットですが、「aspnet_regiis -i」でしょうか。

(サーバー上の正しいディレクトリでバージョンを実行してください)

http://msdn.microsoft.com/en-us/library/k6h9cz8h(v=vs.80).aspx

アップデート:

Web アプリの BIN フォルダーに次の .dll もデプロイしましたか?

  • System.Web.Helpers.dll
  • System.Web.Mvc.dll
  • System.Web.WebPages.Deployment.dll
  • system.Web.WebPages.dll
  • System.Web.WebPages.Razor.dll
于 2012-10-09T13:47:40.270 に答える