I suggest to implement a custom build task. Call it on prebuild in your msbuild/tfs script.
Custom build task should just check .scproj file if there is an include file of cshtml with build action none. Of so just exit returning a non zero int value.