Azerbaijani | English | Persian | Turkish

Blog categories


How to Compile Razor Views on mvc

Razor views can be compiled just by Visual Studio.

but how?

Here we go :

  When you publishing just set the option to "Precompile during publishing", under "File Publish Options" on the "Settings" tab.

Click "Configure" and then tick "Merge all outputs to a single assembly".

Give it a unique name, generally something like


And the Important thing that you have to do is :

Uncheck the "Allow this precompiled site to be updatable"  option


your razor views will be compiled too