Friday, October 25, 2013

Tip 7.9: There is type-ahead selection support in the Solution Explorer

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



Sara Aside

She has been coming up with little songs to keep sane as she posts a daily tip for Visual Studio. She has people swear that they'll catch her on tape singing these one day. One of them is sung to the tune of the Dunkin' Donuts jingle of "Gotta make the donuts" which is "Gotta do tip of the day." Another one she's trying to perfect is sung to the tune of Phil Collins's "Come Dance into the Light" with "It's the simple things in life!" Sad, but true.


She thinks this tip is really cool. She didn't know this one until a coworker showed her, and this was after five years of working on the Visual Studio team. The Solution Explorer supports type-ahead selection, so wherever you are in the tree view, just start typing the full name of your file and the focus will jump to that match, whether a partial match or a full file name match.

VSTip790

Happy Programming! =)
Posted by Nils-Holger at 12:36 PM with 1006 comments.

Thursday, October 24, 2013

Tip 7.8: How to show the Miscellaneous Files project in the Solution Explorer

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



On the Tools–Options–Environment–Documents page, you'll find the Show Miscellaneous Files In Solution Explorer option.

VSTip780

She finds this feature very useful when she's constantly looking at the same files that live outside her current solution. For example, when writing test cases, she would have the actual test case code as its own solution and just reference the test library DLLs. When stepping through the test library, these files get collected under the Miscellaneous Files project. Yes, Miscellaneous Files is actually a project.

VSTip780a

When you reopen the solution, the various miscellaneous files will tag along, just how you left them, provided you have the subsequent option X Items Saved In The Miscellaneous Files Project set to something greater than 0.

Happy Programming! =)
Posted by Nils-Holger at 1:14 PM with 689 comments.

Wednesday, October 23, 2013

Tip 7.7: How to use Simplified Build Configurations

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



Sara Aside

The title for this tip as it appears on her blog is "How to pretend the Configuration Manager doesn't exist, besides closing your eyes and saying, 'I don't see you.'" In other words, the Configuration Manager presented an interesting challenge for her as a tester. But Simplified Build Configurations really took it to a new level.


If you have never touched the Debug or Release configurations or have never heard of the Configuration Manager, you might want to try this tip. Under Tools–Options–Projects And Solutions, you'll see the Show Advanced Build Configurations option. Unchecking this option does quite a few things behind the scenes, but first, she'll briefly describe the Show Advanced Build Configurations option.

VSTip770

By default, Visual Studio comes with two build configurations: Debug and Release. You are free to create your own build configurations via the Configuration Manager. Check out some of her old blog posts on how the Configuration Manager works, if you want to create your own custom build configurations: http://blogs.msdn.com/b/saraford/archive/2005/08/16/452423.aspx and http://blogs.msdn.com/b/saraford/archive/2005/08/18/453346.aspx. If you are using a custom build configuration and you uncheck the Show Advanced Build Configuration check box, Visual Studio will pretend you still have it checked, enabling you to still open the Configuration Manager.

VSTip770a

When you are working in Simplified Build Configuration mode, the following happens behind the scenes:
  • F5 (Debug.Start) runs under the debugger in the Debug configuration. This means that the binaries will be produced in a Debug folder in the output file path.
  • Ctrl+F5 (Debug.StartWithoutDebugging) runs (with no debugger) in Release configuration. This means the binaries are produced in a Release folder in the output file path.
If you change the Build output path (for example, bin\myRelease) and use Debug. StartWithoutDebugging (Ctrl+F5), Visual Studio builds the release in the myRelease folder. But if you press F5, Visual Studio still puts it in the Debug folder. From a UI perspective, Visual Studio hides all access points to the Configuration Manager when in Simplified Build Configuration. For example, the Configuration (Release or Debug) and Platform (Any CPU, and so forth) options disabled on the standard toolbar.

VSTip770b

Additionally, the Configuration Manager command disappears on the Solution Explorer context menu, and Configuration and Platform disappear from the Project Properties–Debug page. And that's more than she ever wanted to type about Simplified Build Configurations, and probably more than you ever wanted to know, but at least now you understand what that little option does. =)

Happy Programming! =)
Posted by Nils-Holger at 12:43 PM with 756 comments.