[英]Visual Studio 2015 CSS Intellisense Broken
Editing cshtml files, I'm used to getting Bootstrap intellisense, regardless of what classes I've already used in said file, like so: 编辑cshtml文件,我习惯于获取Bootstrap intellisense,无论我在所述文件中使用过什么类,如下所示:
Originally, I thought it was just Bootstrap intellisense, but it appears that this is affecting all CSS for my new project. 最初,我认为它只是Bootstrap intellisense,但它似乎影响了我的新项目的所有CSS。 I can link to the CSS files, directly reference the layout file, it doesn't matter.
我可以链接到CSS文件,直接引用布局文件,没关系。 The Bootstrap and other CSS classes do not show, unless I've already used them in the same file:
Bootstrap和其他CSS类没有显示,除非我已经在同一个文件中使用过它们:
I've tried to minimize the differences between the two projects, but to no avail. 我试图尽量减少两个项目之间的差异,但无济于事。 They are on different machines, in different solutions, but everything else is virtually exactly the same.
它们在不同的机器上,在不同的解决方案中,但其他一切几乎完全相同。 Here's what I've checked/tried so far.
这是我到目前为止检查/尝试的内容。
Known differences - The machine it works on is running Windows 7, the machine it doesn't is running Windows 10. 已知的差异 - 它运行的机器运行Windows 7,它没有运行Windows 10的机器。
I've run into this problem again and found a solution! 我再次遇到这个问题并找到了解决方案! I'm not sure if it's the same as the original problem I had, but here's the fix anyway.
我不确定它是否与我原来的问题相同,但无论如何这里都是修复。
If the solution has a SQL project (.dbproj), unload it (right click > unload project). 如果解决方案具有SQL项目(.dbproj),请将其卸载(右键单击>卸载项目)。 There's some weird bug in VS2015 with Bootstrap and SQL database projects that make intellisense for Bootstrap stop working.
VS2015中有一些奇怪的错误,它带有Bootstrap和SQL数据库项目,使得Bootstrap的intellisense停止工作。
In order to get "Class" IntelliSense in VS 2015, try this method. 为了在VS 2015中获得“Class”智能感知,请尝试此方法。 It works for me as follows:
它对我有用,如下:
Ex: Right click on any .aspx file in "Solution Explorer" of VS then select "Open With" option then from the list select "HTML Editor" option. 例如:右键单击VS的“解决方案资源管理器”中的任何.aspx文件,然后选择“打开方式”选项,然后从列表中选择“HTML编辑器”选项。 Now try to check.
现在尝试检查。
Thanks 谢谢
Ali 阿里
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.