.spark 视图被复制到 /bin/Views - 为什么?
构建或发布我的 ASP.MVC 2 应用程序,将 View 目录中的 .spark 文件复制到 /bin/Views/*。
这种冗余似乎毫无用处,因为即使我删除 bin/Views 目录,应用程序也可以在服务器上正常运行。
知道如何防止这种行为吗?
我的文件使用默认构建操作“内容”进行标记,并且视图目录是默认 MVC 模板中的命名空间提供程序。
Building or publishing my ASP.MVC 2 application the .spark files in the View directories copied to /bin/Views/*.
This redundancy seems to be useless as the app runs fine on the server even if I delete the bin/Views directory.
Any idea how to prevent this behavior?
My files are tagged with the default build action "Content" and the View directories are Namespace providers as in the default MVC template.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将视图设置为内容。
为此,在解决方案资源管理器中,单击“视图”(或选择其中多个视图)并按 F4。
在属性中,选中
Copy to Output
属性。应该是假的。Set views as content.
In order to do that - in solution explorer, click on view (or select multiple of them) and hit F4.
In properties, check
Copy to Output
prop. It should be false.