Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Created Unassigned: View files should not be required when deploying a precompiled application [1709]

$
0
0
If you precompile your MVC4 website, you can remove all your views.
The views are just turned into markers (a holdover from webforms), but they are not used at all. You can simply delete and not worry about deploying anything from /views or /areas.

In MVC5 that does not appear to be the case. It appears the FIRST thing the view engine location does is to check to see if the file exists in one of the prescribed locations. That is a change and is not required.

Why look for a file to make sure it is present when you will in fact never even use that file. There is also internal 'caching' inside the view engine code to help speed this up as it does not want to check every time.

None of that is necessary when running a precompiled application. Can we get the MVC4 behavior back?

1) You could try and load the precompiled class for the view before checking for the file on disk. Perhaps this would be expensive for those not using precompilation?
2) There is a 'PrecompiledApp.config' file that is in the root of the website. In the case when this file is present, you would know not to look for files. This is a required file for distribution and contains contents like <precompiledApp version="2" updatable="false"/>

Thoughts?

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>