开发者

How to view an active view C# class in 'Solution Explorer'?

开发者 https://www.devze.com 2022-12-21 17:30 出处:网络
I have a solution which has many projects inside it. I build the solution and have some compile errors.

I have a solution which has many projects inside it. I build the solution and have some compile errors. Double clicking an error will open a class file, called FileA.cs. What I don't know how to do is viewing FileA.cs in the Solution E开发者_开发问答xplorer pane.


You have 2 options without macros, either always enable tracking, or bind a key to toggle it:

If you want to always enable tracking: Enable the Track Active Item in Solution Explorer option, but note there's some performance penalty is leaving this on. Get to this by Tools > Options > Projects and Solutions > General

Alternatively, bind a key to turn this on and off (but you'll have to hit it twice).

Third, macro option, make this macro and bind to a key so you don't have to hit it twice to disable it:

Sub FindInSolutionExplorer()
 DTE.ExecuteCommand ("View.TrackActivityinSolutionExplorer")
 DTE.ExecuteCommand ("View.TrackActivityinSolutionExplorer")
End Sub
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号