Category Archives: Visual Studio

Launching the Source Control Explorer by default in the Visual Studio 2012 IDE

One of the things I find really annoying in Visual Studio 2012 is how hard it is to get to the Source Control Explorer in Team Foundation Server. Because of the new “drop down” interface, you have to go to “Home” and then choose Source Control Explorer. This is rather counter intuitive, and somewhat annoying.

Fortunately, there is an IDE Command: View.TfsSourceControlExplorer. You can map this to a short cut key in Tools > Options > Environment > Keyboard.

screenshot

As an added bonus, you can change the shortcut that launches the Visual Studio 2012 IDE to show the Source Control Explorer by default – just add /Command View.TfsSourceControlExplorer as a parameter to the command

"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe" /Command View.TfsSourceControlExplorer

Creating your own NuGet server

Over the years, I have been compiling little code snippets to perform common tasks – like parsing the filename out of a file path, or adding the ever so useful .With() to the string class (supports “My {0} string {1}”.With(“awesome”, “extension”)). I often find myself opening up old projects to find the code and copying and pasting it into my new project. This leads to a lot of splintered code, and it can be a pain finding the latest version. After watching Scott Hanselman’s latest posts on NuGet, I figured it might help me keep things straight. Creating your own NuGet server is easy – however, getting it to run is a bit more complicated 🙂

I am not going to reinvent the wheel here, as Phil Haack has done a great job here. Some things to note:

  • You can install this in to an existing website (I added it my website using MVC3)
    • However, be aware it does add a default.aspx that you will want to delete so that people still see your old homepage
  • If you are deploying this to a server that binds multiple sites to the same ip address, make sure to add the following to your web.config
    <system.serviceModel>
    <serviceHostingEnvironment multipleSiteBindingsEnabled=true />
    </
    system.serviceModel>
    • Otherwise, you will get errors along the lines of “This collection already contains an address with scheme http”
  • Make sure to add .nupkg to your mime types on IIS (right click properties on the server in IIS MMC)
    • .nupkg application/zip should do it
    • Otherwise, you will get 400 or 404 errors when you try to request your package

Intellisense (AutoComplete) Broken in Sql Server 2008 R2

If your Intellisense in SQL Server Management Studio just stopped working, chances are you have applied Visual Studio 2010 SP1. This is because there is a compatibility issue between Microsoft SQL Server 2008 R2 Management Studio (SSMS 2008 R2) and the Transact-SQL Language Service that is included in Visual Studio 2010 SP1.

The good news is there is a fix included in the latest Cumulative Update package for SQL Server 2008 R2 – http://support.microsoft.com/kb/2507770

All you need to do is download the pack, install it, and go back to saving your keystrokes.