Precompiling an asp.net4 mvc3 website using visual studio 2010

What is the best way to precompile the asp.net4 mvc3 website with all its view files using visual studio 2010?

I'm a little confused because MS provides several solutions that are very similar.

Website Deployment Projects

http://blogs.msdn.com/b/webdevtools/archive/2010/05/26/visual-studio-2010-web-deployment-projects-rtw-available-now.aspx

Web deployment tool

http://www.microsoft.com/download/en/details.aspx?id=25230

or can I do it all from the standard VS2010 SP1 without additional add-ons?

Can someone clarify?

+6
source share
1 answer

When you create or publish your project, the website is already compiled. Only views are dynamically compiled. If you want your views to be compiled as well, you can edit your web project file. Change this line:

<MvcBuildViews>false</MvcBuildViews> 

in

 <MvcBuildViews>true</MvcBuildViews> 

To be able to edit the project file in the visual studio, you first need to unload the project (right-click, "Unload Project"), and then right-click the project again and select "Edit Project". When you make changes, your views will also be automatically created. This is not what you want to do during development, the build time is significantly increased.

+4
source

Source: https://habr.com/ru/post/895706/


All Articles