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

时间:2015-10-06 08:04:50

标签: c# asp.net-mvc visual-studio razor

我必须对ASP .NET MVC项目进行大量重构,我想知道是否有一个选项可以在Visual Studio中使用选项打开所有.cshtml文件,而不是打开每个文件。 我有200多个文件:/

此操作的目的是查看.cshtml文件中的编译错误。

2 个答案:

答案 0 :(得分:3)

您可以在解决方案资源管理器搜索框中键入.cshtml,它将显示具有此扩展名的所有文件。然后您可以轻松选择并立即打开它们。

答案 1 :(得分:1)

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

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!

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.