Blog - Title

Visual Studio 2013 Current Status

  • The Ultimate Visual Studio Tips and Tricks Blog

    Navigate Backward and Navigate Forward


    Keyboard:  CTRL + -; CTRL + SHIFT + - 
    Menu:  View -> Navigate Backward; View -> Navigate Forward
    Command:  View.NavigateBackward; View.NavigateForward
    Versions:  2008,2010
    Published:  3/1/2010
    Code:  vstipEdit0024




    The editor remembers locations when you move in a single command more than several lines away from where you are currently working, or if you edit in a particular location that is not adjacent to the last place you edited.


    The goal is to remember interesting locations so that you can recall where you have been working without remembering so many locations the feature is not useful (such as every character typed, or every line entering several new lines of code one right after the other).


    A go-back marker is dropped under the following conditions:

    • An incremental search (including reverse) leaves a go-back marker at the beginning of the search and another one at the end.

    • A Go To Line action, like CTRL + G, or a mouse-click that moves the cursor 11 lines or more from the current position drops a go-back marker at the new location.

    • A destructive action (like hitting Backspace) after having moved the cursor to a new location drops a go-back marker.

    • Doing a search, like Ctrl+F, drops a go-back marker at the found location.

    • Opening a file drops a go-back marker wherever the cursor was on the old file and drops another on the opened file.


    So with all that, welcome back to the wonderful world of the Navigate buttons (and keyboard shortcuts, too)!  These gems make travelling around your code much, much easier:


  • The Ultimate Visual Studio Tips and Tricks Blog

    Visual Studio 2013 Preview: Enhanced Scroll Bar


    Visual Studio 2013 has another great new feature: enhanced scroll bar functionality. The new scroll bar will show cursor location, breakpoints, and much more! Let’s take a look.

    5-17-2012 12-51-16 PM



    Power Tools

    Before we begin I want to address where some of the new features in VS2013 are coming from. In Visual Studio 2013 many of the new features we put into the product were actually introduced via the Productivity Power Tools for Visual Studio 2012. This is an ongoing trend and you will see that many of the new features from future versions will come directly from the Power Tools. If you are still on 2012 you can get a lot of the newest functionality by installing the Visual Studio 2012 Power Tools which can be found here:



    Scroll Bar Options

    To really get a handle on the new scroll bar functionality the first thing you should do is Right Click on the vertical scroll bar and choose Scroll Bar Options:

    5-17-2012 11-57-37 AM


    You will see several settings that can be modified:

    5-17-2012 12-00-10 PM

    (NOTE: You can also get to this area by going to Tools | Options | Text Editor | All Languages | Scroll Bars)



    Show Scroll Bar

    5-17-2012 12-08-43 PM

    The first two options are pretty self-explanatory they will allow you to show or hide the scroll bars. For the most part you will leave these checked unless you have some special reason not to have them visible. 



    5-17-2012 12-12-18 PM

    The Display area allows you to turn on annotations that will show special items throughout the entire document within the scroll bar. This allows you, at a glance, to see where things like breakpoints and bookmarks are. We will look at these in the order you are most likely to encounter them but here is an example of the vertical scroll bar with annotations in it:

    5-17-2012 12-32-50 PM



    Show Caret Position

    5-17-2012 12-17-37 PM

    The first annotation you will most likely encounter is the caret position indicator. It simply shows the current position of the cursor with a blue line in the scroll bar.



    Show Changes

    5-17-2012 12-28-50 PM

    If you missed my blog post a couple of years ago on tracking changes in the editor, this is a good time to read it. You can find the post here:


    The Show Changes option simply shows the changes within it so you can see modifications at a glance for the entire document.



    Show Marks

    This options is fairly broad and covers several types of marks that can appear in code. Most notably this will show breakpoints:

    5-17-2012 12-42-29 PM


    Additionally, this will also show things like Bookmarks:

    5-17-2012 12-44-01 PM



    Show Errors

    The final indicator is arguably one of the most important. It shows any syntax errors the editor is aware of:

    5-17-2012 12-46-58 PM


    This let’s you quickly see where there are errors that need to be fixed before you compile your code.




    There are two behavior options for the vertical scroll bar: bar mode and map mode. So far everything we have seen is the traditional bar mode for the scroll bar. Now we will switch to map mode:

    5-17-2012 12-55-12 PM


    Map mode essentially turns your vertical scroll bar from this:

    5-17-2012 12-56-48 PM


    To this:

    5-17-2012 12-57-38 PM



    Source Overview

    Map mode is miniature look at your document so you can quickly get a feel for your code. There are four options for source overview when using map mode. I’ll show examples of the four views below. Of these the Off setting will be the most confusing until you see the Preview Tooltip in action so be patient.



    5-17-2012 12-57-38 PM



    5-17-2012 12-59-53 PM



    5-17-2012 1-00-50 PM



    5-17-2012 1-02-23 PM



    Preview Tooltip

    Regardless of which map mode view you use there is also an option to have the Preview Tooltip. Simply put your mouse pointer over any part of the vertical scroll bar and you will get a preview of the code at that position in the document:

    5-17-2012 1-09-33 PM



    All annotations previously mentioned also show up in map mode:

    5-17-2012 1-12-45 PM



    Go to a Specific Location on the Scroll Bar

    You basically have two options when you want to go to a specific location on the scroll bar. Let’s examine both ways.


    Left Click

    As long as you are in map mode:

    5-17-2012 2-39-51 AM


    You can simply LEFT CLICK any area on the scroll bar and you will jump to that location:

    5-17-2012 2-41-10 AM


    For this reason, I suggest, even if you don’t want the map, that you at least use map mode set to Off to get this functionality so you can quickly move around using the scroll bar:

    5-17-2012 2-44-42 AM



    Scroll Here

    Now that you have a solid base level of knowledge for this feature there is one more important item I want to show you: Scroll Here. If you find any place that is interesting to you in the vertical scroll bar and want to quickly go to that location you can simply Right Click the location and choose Scroll Here:

    5-17-2012 10-12-17 PM


    The new location will come into view so you can begin looking at the code:

    5-17-2012 10-13-50 PM




    The enhanced vertical scroll bar is a great tool for developers to quickly see places of interest and to examine those locations. Try this feature out and see if you like it as much as I do. :)

  • The Ultimate Visual Studio Tips and Tricks Blog

    Visual Studio 2013: Zooming In and Out of Text in the Editor


    This week I thought we would focus on some fun quickies that have been in Visual Studio since at least VS2010. The first one we will look at is simply zooming your text in the editor. The concept is really simple. For example, you may want to go from this:

    5-16-2012 12-06-52 PM


    To this:

    5-16-2012 12-08-13 PM


    Being able to zoom in and out is useful if you have trouble seeing or you are doing extreme programming or any situation where making text more readable is necessary. One other thing to keep in mind is that zooming is a per tab activity so zooming in one tab does not set the same zoom level in other tabs. Each tab has it's own zoom level.



    Mouse Wheel

    You can zoom in and out of text using the wheel on your mouse. Just hold down CTRL+Mouse Wheel and you can instantly zoom in and out of text in the editor.


    Most people discover this accidentally. If this annoys you then you can see if there is an update to the Disable Mouse Wheel Zoom extension:


    At the time of writing there isn’t a version that works with VS2013 but that could change.



    Combo Box

    You can go “old school” and use the combo box at the bottom left of the IDE:

    5-16-2012 12-16-30 PM




    If you prefer to use the keyboard, you can always use CTRL+SHIFT+>[Greater Than] and CTRL+SHIFT+<[Less Than].

  • The Ultimate Visual Studio Tips and Tricks Blog

    AJAX fun with the dreaded 'sys is undefined' error


    If you have started to play with AJAX then you have most likely come across the dreaded 'sys is undefined' error.  I found numerous articles on how to get this working but the best ones all point to making sure you have the correct entries in your web.config.   So to summarize what I have read:

    1)  Go to C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\{your version of AJAX}

    2)  Open the sample web.config file and make sure you have the same entries in your web.config

    3)  If you don't then copy and paste is your friend :)

    4)  See if the app works now

     Here are a couple of articles to assist if you are still having issues:

    Chris Riccio's blog

    Lorin Thwaits's blog


  • The Ultimate Visual Studio Tips and Tricks Blog

    Code Metrics – Class Coupling


    SKU: Premium, Ultimate

    Versions: 2008, 2010

    Code: vstipTool0133



    As we continue looking at code metrics in Visual Studio (see vstipTool0129, “Calculating Metrics”), it’s time to look at class coupling. Class coupling also goes by the name Coupling Between Objects (CBO) as originally defined by [CK94]. Basically, class coupling is a measure of how many classes a single class uses. A high number is bad and a low number is generally good with this metric. Class coupling has been shown to be an accurate predictor of software failure and recent studies have shown that an upper-limit value of 9 is the most efficient [S2010].


    According to the MSDN documentation, class coupling “[m]easures the coupling to unique classes through parameters, local variables, return types, method calls, generic or template instantiations, base classes, interface implementations, fields defined on external types, and attribute decoration. Good software design dictates that types and methods should have high cohesion and low coupling. High coupling indicates a design that is difficult to reuse and maintain because of its many interdependencies on other types.”


    The concepts of coupling and cohesion are clearly related. To keep this discussion on topic, I will not get into depth with cohesion other than to give a brief definition from [KKLS2000]:

    “Module cohesion was introduced by Yourdon and Constantine as ‘how tightly bound or related the internal elements of a module are to one another’ [YC79]. A module has a strong cohesion if it represents exactly one task […], and all its elements contribute to this single task. They describe cohesion as an attribute of design, rather than code, and an attribute that can be used to predict reusability, maintainability, and changeability.”



    Class Coupling Example

    Let’s look at class coupling in action. First, create a new console application and create a new class called Person with some properties in it then immediately calculate the code metrics:



    Notice the class coupling is 0 since this class doesn’t use any other classes. Now create another class called PersonStuff with a method that creates an instance of Person and sets the property values. Calculate the code metrics again:



    See how the class coupling value goes up? Also notice that, no matter how many properties we set, the class coupling value just goes up by 1 and not by some other value. Class coupling measures each class only once for this metric no matter how much it is used. In addition, can you see that DoSomething() has a 1 but the constructor, PersonStuff(), has a 0 for its value? Currently there is no code in the constructor that is using another class.


    What if we put code in the constructor that used another class? Here is what you get:



    Now the constructor clearly has code that uses another class and the class coupling metric shows this fact. Again, you can see the overall class coupling for PersonStuff() is 1 and DoSomething() is also 1 to show that only one external class is being used no matter how much internal code we have that uses it.


    Next, let’s create another new class. I’ll call my class Blah and create some properties inside it:



    Now consume the class in our DoSomething() method within the PersonStuff class and calculate code metrics again:



    As you can see, the class coupling for the PersonStuff class goes up to 2 and, if we drill into the class, we can see that the DoSomething() method has the most coupling in it but the constructor still only consumes 1 class.  Using these metrics we can see the overall max number for a given class and drill down into the details on a per-member basis.



    The Magic Number

    As I mentioned with cyclomatic complexity (see vstipTool0131, “Code Metrics - Cyclomatic Complexity”), there is no limit that fits all organizations. However, [S2010] does indicate that a limit of 9 is optimal:

    “Therefore, we consider the threshold values […] as the most effective. These threshold values [for a single member] are CBO = 9[…].” (emphasis added)



    Code Analysis

    When using code analysis, the Extended Design Guideline rule set contains a maintainability area:



    Inside the maintainability area is a rule for class coupling:



    This rule issues a warning when the class coupling is excessive. You can learn more about the rule here:


    Unfortunately, the documentation doesn’t talk about the thresholds set for this rule but I did find a description on the Code Analysis Team Blog ( “Warning at above 80 for class and above 30 for a method”.  These seem abnormally high but at least provide an extreme upper limit. If you hit this warning then something is almost certainly wrong.





    Chidamber, S. R. & Kemerer, C. F. (1994). A Metrics Suite for Object Oriented Design (IEEE Transactions on Software Engineering, Vol. 20, No. 6). Retrieved May 14, 2011, from the University of Pittsburgh web site:



    Kabaili, H., Keller, R., Lustman, F., and Saint-Denis, G. (2000). Class Cohesion Revisited: An Empirical Study on Industrial Systems (Proceedings of the Workshop on Quantitative Approaches in Object-Oriented Software Engineering). Retrieved May 20, 2011, from Université de Montréal web site



    Subramanyam, R. & Krishnan, M. S. (2003). Empirical Analysis of CK Metrics for Object-Oriented Design Complexity: Implications for Software Defects (IEEE Transactions on Software Engineering, Vol. 29, No. 4). Retrieved May 14, 2011, from University of Massachusetts Dartmouth web site



    Shatnawi, R. (2010). A Quantitative Investigation of the Acceptable Risk Levels of Object-Oriented Metrics in Open-Source Systems (IEEE Transactions on Software Engineering, Vol. 36, No. 2).



    Edward Yourdon and Larry L. Constantine. Structured Design. Prentice Hall, Englewood Cliffs, N.J., 1979.

  • The Ultimate Visual Studio Tips and Tricks Blog

    World of Warcraft Install on Vista


    Okay, so I bit the bullet and installed WOW on Vista last night.  I am going to install the patches tonight and see how it works.  If anyone has had issues, lemme know.  BTW, feel free to catch up with me on Eredar (70 NE Priest -- SQLVarChar).  I don't play as often as I used to but still try to get in  a couple of instance runs on weekends.


  • The Ultimate Visual Studio Tips and Tricks Blog

    Visual Studio 2013: Turn Off the Uppercase Menu


    NOTE: This is an older feature. I’ve updated the information for VS2013.


    This is one change to Visual Studio that I’m not a fan of and I still continue to see a ton of posts on this change so thought I would share here as well. 


    I always try to give credit where credit is due and I believe the earliest mention of this fix is by Richard Banks in his post 6\1\2012 here: 




    Mixed Case is Your Friend

    Okay so you really, really don’t like the Uppercase menu in VS2012 because you feel like it is shouting at you:

    5-16-2012 7-50-41 PM



    You would rather go back to mixed case for your menu:

    5-16-2012 7-43-08 PM


    Not a problem! Below are ways you can fix this feature in VS2013.




    Manual Registry Change

    WARNING:  Making changes to the registry can cause unexpected results so do any changes at your own risk!

    1. Open the registry editor and go to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\General\
      (For Windows 8 Express go to HKEY_CURRENT_USER\Software\Microsoft\VSWinExpress\12.0\General)
      (For Web Express go to HKEY_CURRENT_USER\Software\Microsoft\VSWDExpress\12.0\General)

    2. Create a new DWORD value called SuppressUppercaseConversion set to 1

    3. Restart Visual Studio and you should see the change

    NOTE: Watch your spelling if you are typing this manually.




    If you like to “simplify” this a bit you can use PowerShell to run a nice script to make this happen.  However, if you haven’t used PowerShell before this may not be faster for you.

    1. Go to the Start button or (Start Screen in Windows 8) and type powershell then select the Windows PowerShell Entry:


    2. In the PowerShell window copy the script below and paste it in then press Enter:

      Set-ItemProperty -Path HKCU:\Software\Microsoft\VisualStudio\12.0\General -Name SuppressUppercaseConversion -Type DWord -Value 1


    3. Restart Visual Studio and you are good to go.
  • The Ultimate Visual Studio Tips and Tricks Blog

    Reset All Your Development Settings


    Menu:  Tools -> Import and Export Settings
    Command:  Tools.ImportandExport Settings
    Versions:  2008,2010
    Published:  7/16/2010
    Code:  vstipEnv0023


    In the final post dealing with the Import and Export Settings Wizard, we deal with the nuclear option-the "Reset all settings" option:



    WARNING:  Use this at your own risk.  It WILL reset your settings and do things like reset your Toolbox thus getting rid of any custom tabs, code pieces, etc.. you have put in there.


    Clicking Next will give you the option to save your current settings.  YOU SHOULD ABSOLUTELY DO THIS:



    The next screen let's you choose from the list of default settings:



    Choose your default settings of choice and click "Finish".  It will run for a few minutes and reset all your settings.  This is definitely something you would do as a last resort and, remember, you can always bring your old settings back by importing the previous settings.

  • The Ultimate Visual Studio Tips and Tricks Blog

    Make Selection Uppercase or Lowercase


    Keyboard:  CTRL + SHIFT + U (upper); CTRL + U (lower)
    Menu:  Edit -> Advanced -> Make Uppercase; Edit -> Advanced -> Make Lowercase
    Command:  Edit.MakeUppercase; Edit.MakeLowercase
    Versions:  2008,2010
    Published:  4/10/2010
    Code:  vstipEdit0044


    Download the seriously cool Tip of the Day Extension to get the daily tips delivered to your Start Page!


    Okay, so let's say you have some text (a variable, maybe?)



    and you need to do some case-changing action on it.  Plus, there is a crazy guy holding several people hostage and threatening to dip them in boiling chocolate unless you do it fast.  What do you do?  No Problem!  You just select the word and press CTRL + SHIFT + U to make it uppercase



    or if the evil guy isn't satisfied you can always make it lowercase by pressing CTRL + U



    And now you have saved the day!

  • The Ultimate Visual Studio Tips and Tricks Blog

    Death and Repudiation License


    I ran into this the other day ( and thought I would share


    Copyright (c) 2003 why the lucky stiff


    [BSD license text deleted to save space]


    D&R (Death and Repudiation) License


    This software may not be used directly by any living being. ANY use of this

    software (even perfectly legitimate and non-commercial uses) until after death

    is explicitly restricted. Any living being using (or attempting to use) this software

    will be punished to the fullest extent of the law.

    For your protection, corpses will not be punished. We respectfully request

    that you submit your uses (revisions, uses, distributions, uses, etc.) to

    your children, who may vicariously perform these uses on your behalf. If

    you use this software and you are found to be not dead, you will be punished

    to the fullest extent of the law.

    If you are found to be a ghost or angel, you will be punished to the fullest

    extent of the law.

    After your following the terms of this license, the author has vowed to repudiate

    your claim, meaning that the validity of this contract will no longer be recognized.

    This license will be unexpectedly revoked (at a time which is designated to be

    most inconvenient) and involved heirs will be punished to the fullest extent

    of the law.

    Furthermore, if any parties (related or non-related) escape the punishments

    outlined herein, they will be severely punished to the fullest extent of a new

    revised law that (1) expands the statement "fullest extent of the law" to encompass

    an infinite duration of infinite punishments and (2) exacts said punishments

    upon all parties (related or non-related).


Page 4 of 135 (1,345 items) «23456»