230 likes | 474 Views
DEV319. Visual Studio Tips & Tricks. Dustin Campbell (@ DCampbell ) Microsoft Corporation Scott Cate (@ ScottCate ) EventDay.com. Why Are You Here?. Get the most out of Visual Studio 2010 Better / Faster / Code Tricks / Fun Facts / Bets with Friends Everyone will learn something
E N D
DEV319 Visual Studio Tips & Tricks Dustin Campbell (@DCampbell) Microsoft Corporation Scott Cate (@ScottCate)EventDay.com
Why Are You Here? • Get the most out of Visual Studio 2010 • Better / Faster / Code Tricks / Fun Facts / Bets with Friends • Everyone will learn something • If one tip saves one minute per hour • Do some fuzzy math and … • Every tip will save you 1 year of coding
Lay of the Land • We’re gonna go fast, but shortcuts are in the slides • We’re using Visual Studio 2012 RC • Many tips are relevant to earlier versions of Visual Studio • Visual Studio version “legend”: • [05] Visual Studio 2005 • [08] Visual Studio 2008 • [10] Visual Studio 2010 • [10PPT] Visual Studio 2010 + Pro Power Tools • [12] Visual Studio 2012 • We’re using the Visual C# key bindings
Start Page • Show page on startup [10] • Close page after project load [10] • Pin or remove items in “Recent” list [10] • Windows 7 and 8 Taskbar Magic • Pin recent projects [10] • Show Jump List (Win+Alt + n) • Start new instance (Win+Shift + n) • Start new instance as admin (Win+Shift+Ctrl + n) • Toggle instances (Win + n) • Toggle instances (without Aero Peek)(Win+Ctrl+ n)
Simplification • UX Refresh [12] • Light/dark themes [12] • Toolbar simplification [12]
Window and Document Management • Pinned document tabs [10PPT] • Move/Dock in Windows 7 and 8 (Win + <arrow key>) • Float/Dock in Visual Studio [10PPT](Ctrl + Double Click) • Preview Tab [12] • Split or create new window [05] [12.VB] • Close All Documents [12] • Close All Documents but Pinned [12] • Close All Documents but This [10] • Cycle Tool Windows [05](ALT + F6)
Search • Quick Launch [10PPT](Ctrl + Q) • Use @ prefix to filter search (e.g. @opt) • Visual Studio Windows • Solution Explorer [10PPT](Ctrl + ;) • Team Explorer [12](Ctrl + ') • Error List [12] • Toolbox [12] • Reference Manager [10PPT](Ctrl + E) • New Project/File [10](Ctrl + E) • Find Results [12]
Solution Explorer • Drill down into types and members [10PPT] • Multi-instancing [10PPT] • Pivots [10PPT] • Collapse projects [12] • Track Active Item in Solution Explorer [08] • Sync to Active Document [12](Ctrl + [, S) • Filters [12] • Pending Changes (Ctrl + [, P) • Open Files (Ctrl + [, O)
Navigation • Simplified Navigation [05](Ctrl + - andCtrl+Shift + -) • Go to Definition [05](F12) • Go to Definition Stack [05.C#](Ctrl+Shift+ 7/8) • Find All References [05](Shift + F12) • Metadata as Source [05](C# only) • Code Definition Window [05](C# only) • Iterate List Window (e.g. Find Results) [05](F8) • Navigate To [10](Ctrl + ,) • Activate Open File [05](Ctrl + Alt + Down)
Code Editor Tricks • Zoom [10](Ctrl+Shift + </> orCtrl + Mouse Scroll) • Multiline Editing [10](Alt+Shift + Up/Down orAlt + Mouse Up/Down) • Find [10PPT](Ctrl + F) • Highlight References [10](Ctrl+Shift + Up/Down) • Background Error Squiggles [05.VB] [08.C#] • Call Hierarchy [05.C++] [10.C#] [12.VB](Ctrl + K, T) • Clipboard Ring [05](Ctrl+Shift+ V)
Writing Code • IntelliSense • Filtering [10](Substring and Camel Case) • Suggestion mode [10](Ctrl+Alt + Space) • Undeclared types after “new” [10](C# only) • Smart Tags [05](Ctrl + .) • Rename [05] • Generate from Usage [10] • Add Using/Import [05.C#] [08.VB] • Error Corrections [05.VB]
Writing Code, part 2 • Code Snippets [05] • IntelliSense Expansion (Double <tab>) • Insert Snippet (Ctrl + K, X and ?<tab> in VB) • Show/Hide Snippet Highlights [08.VB] • Organize/Sort Usings[08.C#] [10PPT.VB]
Debugging • IntelliTrace™ – Back in Time [10] • Breakpoint Name / Group [On|Off] / Export / Import [10] • Trace Points [05] • DataTips [05] • Pin and Persist DataTips [10] • Adjust DataTip Transparency [05] (Ctrl) • Debugger Visualizers [05] • Run to Cursor [05](Ctrl + F10) • Step Into Specific [08](Shift+Alt + F11) • Break when this exception type is thrown [12]
Extending Visual Studio 2010 • Extension Manager • Online Gallery • Easy to Enable/Disable • Safe Mode (run without extensions) • Devenv.exe /SafeMode • Popular Extensions • Nuget • Pro Power Tools • Power Commands
Architecture Diagrams • New Modeling Project • Diagrams *.dgml • Sequence Diagrams • Layer Diagrams
Scott’s Favorites • Temporary Projects • Open Containing Folder (File.OpenContainingFolder) • Attach to Process (Ctrl+Alt + P) • Go to Brace/Sibling (Ctrl + ]) • With Select (Ctrl + Shift+ ]) • Scroll Editor (Ctrl + Up/Down Arrow)
DEV Track Resources • Visual Studio Home Page :: http://www.microsoft.com/visualstudio/en-us • Somasegar’s Blog :: http://blogs.msdn.com/b/somasegar/ • Jason Zander’s Blog :: http://blogs.msdn.com/b/jasonz/ • Facebook :: http://www.facebook.com/visualstudio • Twitter :: http://twitter.com/#!/visualstudio
Resources Learning TechNet • Connect. Share. Discuss. • Microsoft Certification & Training Resources http://northamerica.msteched.com www.microsoft.com/learning • Resources for IT Professionals • Resources for Developers http://microsoft.com/technet http://microsoft.com/msdn
Required Slide Complete an evaluation on CommNet and enter to win!
MS Tag Scan the Tag to evaluate this session now on myTechEd Mobile
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.