locked
Some questions about pre-compile options when publishing MVC project RRS feed

  • Question

  • User-257409430 posted

    Hi,

    there are several option to choose from when you publish a project:

    Exclude file from App_Data folder - does this affect MVC projects?

    Then if you goto Configure and then Advanced Precompiler settings

    Allow precomiled site to be updateable - this puts placeholders where the cshtml files go and compiles the views.

    Question is, is this faster only the first time a visitor goes to a site or is it faster every time. If its faster every time shouldnt this be unchecked.

    Thanks.

    Thursday, August 22, 2013 8:00 AM

Answers

  • User-1454326058 posted

    Hi damon,

    Thanks for your post!

    As far as I know, there are some functions below when we pre-compile MVC project.

    1. To avoid any runtime hit when your site starts, since there is nothing left to compile at runtime. This can be significant in sites with many views.
    2. No longer need to deploy the cshtml files at all, resulting in a smaller deployment file set.
    3. Can avoid some run-time errors.

    In my opinion, it is faster every time when visitor goes to the site.

    Based on you said “Exclude file from App_Data folder - does this affect MVC projects?”, I would like to know what’s the exclude file in your App_Data folder, is it any Data file, I think they will affect your project if they are relate to your project.

    Here is a reference below that may benefit you:

    Deploy ASP.NET MVC projects

    http://www.asp.net/mvc/overview/deployment

    Thanks

    Best Regards

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, August 23, 2013 4:49 AM