Visual Studio 2012解决方案资源管理器搜索不搜索cshtml文件

时间:2013-02-10 11:17:20

标签: search razor refactoring

当我在Visual Studio 2012 MVC 4 Web项目中重构一个命名空间时,包含“@model MyFirstWeb.Domains.LoginModel”的剃刀文件没有被触及,这在首次编译时会导致异常。

这不是很多,但相当奇怪?,我可以将cshtml注册为搜索文件扩展名吗?

如果我使用“搜索解决方案资源管理器”来尝试存档我知道的文本,那么我什么都没得到?

我错过了什么?

2 个答案:

答案 0 :(得分:0)

这是一篇博客文章,解释了解决方案资源管理器搜索的细节:

http://www.schwammysays.net/visual-studio-2012-tip-search-in-solution-explorer

基本上,您正在搜索解决方案资源管理器,而不是文件,因此将搜索解决方案资源管理器中可见的任何内容。幸运的是,Solution Explorer现在也包含逻辑结构。

答案 1 :(得分:0)

这似乎是VS 2013 R1中的一个已知错误,已被识别然后关闭,但用户仍然遇到问题。虽然在解决方案资源管理器之外,您可以使用' Ctrl +,'在解决方案中搜索这些文件类型。

相关的门票在这里......

http://connect.microsoft.com/VisualStudio/feedback/details/801838/solution-explorer-search-doesnt-include-js-or-cshtml-results

http://connect.microsoft.com/VisualStudio/feedback/details/801836/solution-explorer-doesnt-search-files-projects-inside-solution-folders