Gérard Lambert
Gérard Lambert

Reputation: 43

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. I have more than 200 files :/

The aim of this manipulation is to see compilation error in the .cshtml files.

Upvotes: 1

Views: 2797

Answers (2)

Sergey Vlasov
Sergey Vlasov

Reputation: 27930

You can type .cshtml in the Solution Explorer search box and it will show you all files with this extension. Then you can easily select and open them at once.

Upvotes: 3

Russ Clarke
Russ Clarke

Reputation: 17909

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.

Upvotes: 1

Related Questions