Switch to fluid Switch to wfix Switch to fixed

StackPanel

dynamic rants = new Stack();

Author Archive

C# VS IDE Tips and Tricks

Posted by Vin on Nov-6-2008

A number of development enhancement tools and keystrokes were added in Visual studio 2005, and a lot more in Visual Studio 2008. A developer should have these handy to be more productive during development.

Recently Microsoft and DevExpress announced that CodeRush Express is now free, which is a nice thing.

After watching Dustin Campbell’s session @ PDC 2008 on Visual C# IDE Tips and Tricks, I thought of compiling this highly useful list of things that developers can use to develop stuff quicker in Visual Studio. In the list below, CRX means CodeRush Express.

  1. Code Definition Window: Dynamically loads up C# class view of any class that you doubleclick in the Source Editor window
  2. Ctrl+shift+7 and Ctrl+Shift+8 - Navigation through ‘go to definition’
  3. Navigate through all references - F8 (after you do find all references)
  4. Track active item in solution explorer - set this in Tools->Options->Projects and Solutions
  5. Source code outliner power toy - show code view hierarchy, can also be used to navigate around code 
  6. Ctrl+Alt+F - Go to file - Quick file navigation
  7. Ctrl+Shift+Q - find symbol
  8. Go to open file (Ctrl+Alt+down)
  9. Highlight usages of a variable - Ctrl+Alt+U (CRX)
  10. Use code snippets, create your own
  11. Smart tag - add using namespaces - Ctrl + .
  12. Ctrl+Alt+ + for selecting code hierarchically Ctrl+Alt+ - lesson selection - Expand Shrink Selection (CRX)
  13. DebuggerDisplay attribute on top of the class
  14. Ctrl + ~ for refactoring (CRX)
  15. Solution wide TODO tasks in VS 08
  16. Ctrl+K+X to bring up code snippets
  17. Alt+ arrow keys to move the caret between Camel/Pascal cased text (Use Shift+Alt arrows to select those as well) (CRX)
  18. Name anonymous type - Ctrl+`

PDC 2008 and must watch PDC sessions

Posted by Vin on Oct-31-2008

PDC 2008 just concluded yesterday, and there was lot of excitement around announcements and super duper demos. Well people say this one didn’t quite match PDC 2005. Out of all the keynotes, Scott Gu’s was perticularly interesting to developers and others were more of marketing talk.

Some of the key technologies and announcements:

  1. Azure cloud computing services platform 
  2. Windows 7 showcase
  3. Visual Studio 2010 showcase (Videos and Screencasts on VS 10)
  4. Oslo  and M language (Videos and Screencasts on Oslo)
  5. .Net 4.0 (Video on C# 4.0 features)
  6. JQuery intellisense in Visual Studio
  7. Silverlight outside the browser
  8. WPF Toolkit with Office Ribbon  and Visual State manager for WPF
  9. Silverlight Toolkit

There were lot of very interesting and relevant sessions for developers. My favorite is Scott Hanselman’s session, where he showcased his BabySmash (ISV as he calls it) and used all the different technologies (FoodCourt analogy) and got people really interested. His presentation skills are awesome and the excitement he brings to the developer crowd is immense. As LazyCoder pointed out on twitter stream, we are looking forward to Scott Hanselman doing the developer keynote @ PDC2010.

Anyway, I’ve watched most of these sessions @ microsoftpdc.com and rest of them will be catching up later next week.

So here’s a list of sessions that would be interesting for people with similar background as mine.

  1. Microsoft .NET Framework: Overview and Applications for Babies by Scott Hanselman
  2. Microsoft Visual Studio: Customizing and Extending the Development Environment
  3. Microsoft Silverlight, WPF and the Microsoft .NET Framework: Sharing Skills and Code
  4. Managed Extensibility Framework: Overview
  5. Microsoft Visual C# IDE: Tips and Tricks
  6. Microsoft Expression Blend: Tips & Tricks
  7. Coding4Fun: Windows Presentation Foundation Animation, YouTube, iTunes, Twitter, and Nintendo’s Wiimote
  8. WPF Roadmap
  9. WPF: Data-centric Applications Using the DataGrid and Ribbon Controls
  10. The Future of C#
  11. ASP.NET MVC: A New Framework for Building Web Applications
  12. Agile Development with Microsoft Visual Studio
  13. Visual Studio Debugger Tips & Tricks
  14. A Lap around “Oslo”
  15. “Oslo”: Customizing and Extending the Visual Design Experience
  16. “Oslo”: Repository and Models

Dev Tip 2: Must have debugging settings

Posted by Vin on Oct-24-2008

When you are debugging an especially large application with lots of projects, the debugging skills matter more than ever, while troubleshooting/bug fixing. I’ve seen many developers who just can’t get to the exception, because they don’t step deep into the stack. There are 2 settings you can set, to make the debugging experience revealing and useful.

1. Set the Thrown checkbox on CLR exceptions (atleast that, you can do the rest of them too like win32 etc) in the Debug->Exceptions dialog in Visual Studio

2. Set the ‘Show External Code’ on the context menu in the Call stack tool window in Visual Studio