选项“将所有页面和控制输出合并到单个程序集”仍然会产生 100 个编译文件

Jea*_*ars 6 c# precompile asp.net-mvc-4 visual-studio-2012

我有一个 MVC Web 应用程序,我想在 Web 服务器上部署它。为了提高性能并防止网站被篡改,我设置了以下选项:

联系:
Publish method: File System
Target location: C:\builds\PROJECTNAME

设置:
Delete all existing files prior to publish: Yes
Precompile during publishing: Yes
Exclude files from the App_Data folder: No

高级预编译设置:
Allow the precompiled site to be updatable: No
Emit debug information: No

合并选项:
Selected: Merge all pages and control outputs to a single assembly
Name: BigAss_PROJECTNAME

构建完成后,我拥有框架所需的各种 DLL、我们的 DevExpress 组件等,还有 130 个名称类似于“App_Web_22vyifjz.dll”的 DLL。

此外,我在 bin 文件夹中有 1241 个 .compiled 文件,其名称类似于“_createandedit.cshtml.3b4d6ffa.compiled”,这似乎与解决方案中的 cshtml 文件匹配。

据我所知,各种.cshtml files与内容“这是预编译工具生成的标记文件,不应被删除! ”仍然存在,但所有这些DLL's.compile files没有想。

有什么办法可以防止这种情况吗?我在某处错过了一个选项吗?