防止空MVC模板自动安装Bootstrap [英] Prevent empty MVC Template from auto installing Bootstrap

查看:102
本文介绍了防止空MVC模板自动安装Bootstrap的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述






解决方案


Hi Damo1895,


欢迎来到MSDN论坛。


请参阅您的描述,我在我的VS 2015上进行了测试,并与负责MVC开发的同事进行了讨论。我发现当我们添加一个
视图时,默认选中"使用布局页面"选项,如下面的屏幕截图所示,它会自动安装由于_Layout.cshtml而导致的引导程序和依赖项包括那些。您可以打开_Layout.cshtml文件来检查这一点,如果
取消选中上面的选项,那么这些引导文件将无法创建。



同时,如果您不想取消选中上面的选项,它看起来像有一些方法可以帮助您达到这个要求,请检查这个
类似的问题:
如何防止自动 - 在MVC 5脚手架中安装Bootstrap
(和依赖项)?
和davidmdem提供3种方式
  (我认为,你可以尝试创建一个自定义的空MVC项目模板并导出到VS中,这样您可以在下次直接创建这样的空模板)




最好的问候,


Sara



解决方案

Hi Damo1895,

Welcome to the MSDN forum.

Refer to your description, I tested it on my VS 2015 and discussed with our colleague who are responsible for MVC development. I found when we add a view, and it default check the option ‘Use a layout page:’ like the following screenshot, which auto install the bootstrap and dependencies due to the _Layout.cshtml includes those. You can open the _Layout.cshtml file to check this and if you uncheck the above option and those bootstrap files will not create.

Meanwhile, if you do not want to uncheck the above option, it looks like there are some methods to help you achieve this requirement, please check this similar issue: How to prevent auto-install of Bootstrap (and dependencies) in MVC 5 scaffolding? and davidmdem provided 3 ways  (for my opinion, you can try to create a custom empty MVC project template and export into VS, so you can directly create such empty template next time)

Best regards,

Sara


这篇关于防止空MVC模板自动安装Bootstrap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆