简体   繁体   English

Visual Studio 2013 /打开特定扩展名的所有文件

[英]Visual Studio 2013 / Open all files of a specific extension

I have to make a huge refactoring of an ASP .NET MVC project and I was wondering if there is an option to open all .cshtml files with an option in Visual Studio, instead of opening each file. 我必须对ASP .NET MVC项目进行大量的重构,我想知道是否可以通过Visual Studio中的选项打开所有.cshtml文件,而不是打开每个文件。 I have more than 200 files :/ 我有200多个文件:/

The aim of this manipulation is to see compilation error in the .cshtml files. 此操作的目的是查看.cshtml文件中的编译错误。

You can type .cshtml in the Solution Explorer search box and it will show you all files with this extension. 您可以在“解决方案资源管理器”搜索框中键入.cshtml,它将显示具有此扩展名的所有文件。 Then you can easily select and open them at once. 然后,您可以轻松地一次选择并打开它们。

I wonder if you can do this with a Macro. 我想知道您是否可以使用宏执行此操作。

My best suggestion would be to install this Addon: 我最好的建议是安装此插件:

https://visualstudiogallery.msdn.microsoft.com/d3fbf133-e51b-41a2-b86f-9560a96ff62b https://visualstudiogallery.msdn.microsoft.com/d3fbf133-e51b-41a2-b86f-9560a96ff62b

It should be possible to have a macro to do this. 应该可以有一个宏来执行此操作。

I suggest that you consider how you're going to do this though, as opening 200+ files is probably going to make Visual Studio unresponsive! 我建议您考虑如何执行此操作,因为打开200多个文件可能会使Visual Studio无响应!

Alternatively! 或者! (and no, I don't work for them) (不,我不为他们工作)

Get a copy of Resharper and set it to analyze the entire solution for errors, I believe it will show .cshtml problems too. 获取Resharper的副本并将其设置为分析整个解决方案的错误,我相信它也会显示.cshtml问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM