1

I'm making a website using MVC and Razor.

I have no performace problems, but the first time the view is used the page delay to load.

I believe that is when the view is being compiled.

I read about using other compilers or something. But I'm avoiding dependencies.

Is there any way to compile all views when I start the site, without using other dlls?

Gustavo Rossi Muller
  • 1,062
  • 14
  • 18

1 Answers1

-2

When we change to false, the problem is really minimized.

Into Web.config:

<compilation debug="false">
Gustavo Rossi Muller
  • 1,062
  • 14
  • 18
  • Bad idea, you shouldn't run in debug mode on production. Better look at pre-compiling javascript / templates instead. – Bouke Aug 28 '18 at 10:55
  • you are correct @bouke, I change the answer to avoid confusing. In production pre-compiled updatable views and IIS optimization are used – Gustavo Rossi Muller Aug 30 '18 at 12:15