3
votes

Recently I've noticed that after installation VS 2012 I have 2.0 version of "ASP.NET Web Pages" assemblies like System.Web.WebPages.dll, System.Web.Razor.dll, System.Web.Helpers.dll etc. Since I remember there was version 1.0. This cause a lot of problems when I'm deploying web application to production server because there I have only 1.0 version and csproj file contains a references to . So in Dev visual studio has a reference pointing to C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v2.0\Assemblies\System.Web.Helpers.dll which does not exist in PROD.

QUESTION: Nevertheless I’m wondering what cause the upgrade of "ASP.NET Web Pages" assemblies? Is it because of async support in .NET 4.5 or is there any other reason?

2

2 Answers

1
votes

MVC3 used Web Pages 1 for the Razor view engine.

Similarly, MVC4 uses Web Pages 2 for the updated Razor view engine, which includes some new syntax features such as automatic URL resolution and optional HTML attributes.

In all new MVC projects the references should be pointing to the NuGet package dependencies that are created when the project is created. This causes all the referenced DLLs to be included in the application's "bin" directory. When you then deploy the application, all the references are self contained, and there should be no extra assemblies to include.

1
votes

Yes, and the inclusion of a number of MVC features, new helper methods, better validation.