Download Visual Studio Updates For Offline Installation

In case you don’t know already, Visual Studio 2012 Update 2 was released April 4th (Official AnnouncementDownload PageRelease Notes).

Like the previous Visual Studio update, you get a very small EXE file, which you run to download the update from the Internet, install it, and then delete it. This means that if you need to install the update on multiple machines, you may need to download it multiple times.

In this post, I’ll show you how to get the EXE to download the files to a known location so that you can use it on multiple machines, my sample update will be Visual Studio 2012 Update 2.

Offline Download Instructions

  1. Download the standard small EXE file, for VS 2012 Update 2, the filename is VS2012.2.exe
  2. Open a command window at the same folder you downloaded the EXE to

    One easy way to do it is open the folder with Windows Explorer, and write "powershell" (or "cmd" for standard command prompt – both without quotes) in address bar

  3. In command window, write
    .\VS2012.2.exe /layout

    Note the "/layout" flag, this tells the EXE you want to download the files and keep them, instead of install and delete them. Also note the file name may be different for different updates (or if you saved it with different name)

  4. When a wizard similar to installation shows, choose the download folder at the first step and press "DOWNLOAD".   

    download location

    I suggest that you create a new folder to store the files to, what you are downloading is an EXE with the same file name as what you downloaded, and a "Packages" folder containing all different bits of the update

  5. Wait as the download completes. This will take time, long time. That’s why we want to do it fewer times, right?


    Once finished, you can copy the downloaded folder to other machines, and use the EXE next to (NOT inside) the "Packages" sub-folder to install the update without requiring any extra downloads.

The instructions are also found at the end of the download page, but it seemed that not many people noticed it, which is why I wrote this post.

Gotchas & Going Forward…

Note that the download tool isn’t exactly like your preferred download manager. Don’t expect download speed optimizations or error-proof resume for network failures, etc..

There is a feature request for the Visual Studio to include the update in an ISO file that you can download use the best way you like instead. If you want to see this happening, please vote it up here:

On _references.js files in VS2012 – VS2015, or the state of JavaScript Intellisense in Visual Studio

If you downloaded Visual Studio 11 Beta, and tried to create a new ASP.NET MVC 4 empty project, looking at the “Scripts” folder, you’ll see this new file “_references.js”:


Which looks like the following:

/// <reference path="jquery-1.6.2.js" />
/// <reference path="jquery-ui-1.8.11.js" />
/// <reference path="jquery.validate.js" />
/// <reference path="knockout-2.0.0.debug.js" />
/// <reference path="modernizr-2.0.6-development-only.js" />

The VS <reference /> Syntax

As you probably know, the // &lt;reference path=”…” /&gt; syntax was introduced in Visual Studio long time ago to make you able to have intellisense in any JavaScript file to include everything defined in the JavaScript located at this path.

In easier words, if you write the very first line in any JavaScript file, say “my-page.js”, and make sure the path points to the proper jQuery file, when you write code in “my-page.js”, you’ll get intellisense for everything in the jQuery file. The quality of the intellisense will vary based on the referenced jQuery file, whether it’s minified file (least intellisense info, only member names, sometimes), just standard source/debug file, or even one that VsDoc comments (best intellisense, might even have notes on what types you need to pass to methods, when defined in VsDoc comments).

The Resharper Way

If you are using Resharper 6 or so, Resharper will give you intellisense from all files in the project. Generally speaking this is a good thing, but it has two drawbacks:

  • If you have so many JavaScript files in the project (for example, number of common files plus a file or two for every page in a big project), the JavaScript editor experience can be bit slow in times, as Resharper tries to evaluate all the JS files to get you intellisense
  • When you type the first letters of a member, the intellisense menu will bring so many results, because it will include all possible members from all files in the project, even the ones completely unrelated to what you are doing now. The way Resharper tries to make this less severe, is that it tells you which file it picked every intelisense item from.

The Visual Studio 2012 Way: Or The _references.js File

In VS 11, Visutal Studio will give you intellisense from all files that have references in the “_references.js” file. This way you can define the global / common files you use all the time. This might include some library files like jQuery, or some files you use everywhere in the project like some internal utilities files.

For related files, you can use the “<reference >” syntax on top of every file to connect them (from intellisense point of view).

File Location

Note that there is only one _references.js file for each project. It doesn’t work like web.config where you have have web.config files in site folders affecting only those folders.  An _references.js file in any other location than “~/Scripts/_references.js” will be just like any other JS file and won’t be used for global intellisense. Even putting the file in the root of your web project will not work as well.

Update (March 21, 2012)

After reading Scott Hanselman’s post on hidden web features in Visual Studio 11 beta (posted yesterday), turns out you can add files to the global JavaScript intellisense from the Visual Studio Tools –> Options Dialog:


In the options windows, go to Text Editor –> JavaScript –> Intellisense –> References node in the tree view at the left, then from the dialog that comes, choose “Implicit (Web)” for “Reference Group”. You can see that the _references.js file itself is just an entry in the list, and you can add other entries below.

You can pick specific files, or use the “~/path-to-file” to use a path relative to the root of your web project.


Resharper Support For VS11 – Download Link & Installation Hints

In case you haven’t noticed the update of my previous post about VS 11, Resharper 6.1 nightly build supporting VS 11 has been out already.



Notes On Installing Resharper 6.1 Nightly Build For VS11

  • The file you download is not an EXE, but it is still an installer. All You need to do is run the file and press "Install"
  • You can use the license key mentioned in the download page, but, you may try your existing Resharper 6.0 key as well and see if it works.
  • Likely the Resharper keyboard shortcuts won’t work directly. You need to enable them yourself. More on that below…
  • UPDATE: If you install a nightly build, then a new build comes out and you try to install it, you get "This extension is already installed to all applicable products.". More on that below…


To enable the Resharper keyboard shortcuts:

In Visual Studio 11, go to Resharper Options menu:


In the left side, choose "Visual Studio Integration"


Under "Keyboard Shortcuts", press "Apply Scheme"


Some quick dialog will show with "Cancel" button (don’t press it!). Wait until it disappear, and you are done. Click OK to close the Options dialog, and start enjoying the Resharper shortcuts!



To Solve: "This extension is already installed to all applicable products." Error

If you try to install the Resharper VSIX installer file for VS11 when you have an earlier Resharper VS11 build, you may get an error that looks like:


Visual Studio thinks the two builds are the same. The likely cause is that Resharper is using the same version number in the installer.


This can be easily fixed by opening VS 11, going to Tools -> Extension Manager, finding the Resharper extension (yes, in VS11 it’ll be there, in  earlier VS version, it won’t), click the Resharper extension in there then click "Uninstall", accept the confirmation, and close VS11 afterwards.


The installer should then work normally.

Notes On Using Visual Studio 11 As Primary IDE On Windows 7

It’s been quite sometime since I first installed VS 11 (soon after dev preview came way), so, I thought I’d share my experience around using it as primary IDE (with VS 2010 solutions most of the time):

  • It works nicely with Visual Studio 2010 solutions, even big real-world ones. It doesn’t convert them but does some changes to project files which are backwards compatible (mainly minor formatting changes). Note that from the source-control point of view, those are still changes.
    • Somehow all my IIS 7.5 application pools lost their "Enable 32-bit applications" option very shortly after that. This is too coincidental with Visual Studio 11, although I’m not 100% sure if it was the reason.
      It could be hard to debug, If you start getting errors like "unable to load assembly <some path>.dll. or one of its dependencies. An attempt was made to load a program with an incorrect format.". Check for that option.
  • It works a bit faster than Visual Studio 2010. Maybe because it has fewer plug-ins, but I think if I remember bare-bones Visual Studio 2010 correctly, this Visual Studio 11 one is still (slightly) faster.
  • Not much difference in editor for C#, but nicely improved editor for JS / CSS
  • The real differently looking was the team explorer & TFS features in general – mixed feelings about it
    • Not sure I like how Pending Changes is not a separate window anyone. I have to change the Active View to Work Items to find the query I want, click it, go back to Pending Changes, and then drage the work item I want to associate with changeset
    • The changed files show in folder hierarchy. You have two completely separate hierarchies for “Included” and “Excluded” files in/from the changeset. Makes it easier to avoid “checked-in this file by mistake” errors.
    • When comparing files, finally you get coloring (nice one), one of the modes is combined view (they still have 2, and 3 pane views), which does support live editing.  It’s not just text editing experience you get in some merge tools. It’s context-aware full VS editor experience. Things like intellisence, Go To Declaration, Find Usage, Refactor, etc.. and context menu options including those added by third-party tools like TestDriven.NET are available. .
      I found myself editing files in combined-compare view a lot and it makes it great seeing exactly what I’m changing
  • Needed to make a small hack to get TestDriven.NET working.
  • Of course I miss Resharper!  <– Not anymore! See below…

I generally recommend using it, and think it’s safe and nice if you ask Smile

Running VS2010 Gallery Extensions In VS2011 Developer Preview, Meet Git Source Control Provider

Yesterday I wrote about how to get old style add-ins (showing in Tools-> Add-ins Manager) to run in Visual Studio 11, demonstrated with Test Driven .NET.

Today I write about getting Visual Studio Gallery extensions (showing in Tools->Extensions Manager) to work with Visual Studio 11, demonstrated with Git Source Control Provider.

The two posts depend on minor changes to the Visual Studio 2010 versions of the plug-ins.

Visual Studio Extensions Gallery

When you run Tools->Extensions Manager in Visual Studio, it looks at Visual Studio Gallery feed and reads what’s in it. When you choose to install an extension, you download a ".vsix" file, that contains all the files of the extensions and then run it.

So, to get an extension to work with Visual Studio 11, go to the Visual Studio Gallery website to download the extension ourselves.

Now, in the "FIND" box, try to reach what you want, for this exercise we’ll look for Git Source Control Provider.


Click on the plugin you want in the result:


Then on the download link in there (verify it’s VS 2010 extension)

For this example, on


After download, we get the "GitSccProvider.vsix" file. Rename that to "", and extract it to some folder, say "GitSccProvider" (some compression programs allow you to do this without renaming. I’m here using Windows default tools).

It should look like this:


Right click "extension.vsixmanifest" and choose Open With->Notepad


It should look like (highlight is mine):


We need to do 2 things.

First, change MaxVersion (highlighted above) from "4.0" to "4.5".

Second, under <SupportedProducts>, before the opening of <VisualStudio Version="10.0">.

<VisualStudio Version="11.0">

So, the file should look like:


Save the file, select all the files in the folder (do "not" go up and select the folder itself), right click the selection, and choose Send To-> Compressed (zipped) file.


By default, this creates a new "" file in the same folder,. Rename that file to "GitSccProvider.vsix" (accept Windows warning, say yes!).


Run the "GitSccProvider.vsix". It may take a short while to open, but then you should see something like:


(Note, you won’t see Visual Studio 2010 option if you have the extension installed in it already)


Now, proceed with "Install", after it’s done, close it, and run a new instance of Visual Studio.

You should be able to find it installed under Tools-> Extension Manager:



That’s it. Use the same concept for other extensions in the gallery (read the warning at the end of the post though).


Notes About Git Source Control Provider

Because this specific extension is a source control provider, to use it, you need to go to Tools->Options->Source Control and explicitly choose to use it. This is not the case for non source control provider plug-ins (i.e. not the case for the very vast majority of extensions).



Warning: Running Doesn’t Mean Working

The first extension I got running in VS 11 was Visual Studio Color Themes Editor. It got its menu in, and I can choose colour palettes and everything, but here is what I get if I choose anything other than "Default" palette:


Not very pleasant, ha?

Basically, this is a hack. It may work nicely like the one demoed here,, and it may not. The difference in Visual Studio is not just version number. There must be a lot of internal design and APIs and such that may affect how the plug-ins work.

So, try it and see Smile

Running Test Driven .NET / Gallio MBUnit / .Addin Plugins In VS2011 Developer Preview

Background (Safe to skip)

I have been using Visual Studio 11 as primary IDE instead of Visual Studio 2010 at work all day. Details of that might come in a later post, for now, this is on a specific problem. Getting TestDriven.NET to work with Visual Studio 11.

The current project uses MbUnit for number of Selenium functional tests locally and on CI servers. We used to run those using Resharper 5.x in Visual Studio 2010. When Resharper 6 came out, the Gallio / MbUnit Resharper plug-in that made running those tests possible was not compatible with it (and still is not to the date of this post), so, we used TestDriven.NET instead.

When Visual Studio 11 Developer Preview came out,, all installed plug-ins didn’t work with it.

Plugins are two types:

  1. Visual Studio Extensions: Downloaded from Visual Studio Gallery usually,, which is browsable from the IDE Tools-> Extensions Manager menu
  2. Old Style Addins: Usually have their custom installers, which basically drop a ".addin" file (which describes the add-in to Visual Studio) along with the DLLs that make the plug-in. The default location is My DocumentsVisual Studio 2010<or 11 for the preview>Addins. Sometimes, addins are in other locations as well.

TestDriven.NET comes under the 2nd category.

Test Driven .NET With Visual Studio 11

To get the TestDriven.NET plug-in working with Visual Studio 11, we need we first need to get the location of the TestDriven.NET installation. For me the path was C:Program Files (x86)TestDriven.NET 3.

Go to this folder, you should find a file named "TestDriven2010.AddIn". Make a copy of this file, and rename the copy to "TestDriven11.AddIn".


Run Notepad as administrator (Right click it and choose "Run as administrator"),


Click File->Open, and browse to  the "TestDriven11.AddIn" file (You’ll need to choose "All files" from the file type drop down).


The file should look like that:


Change <Version>10.0</Version> to <Version>11.0</Version>.


Save the file, and close this.


Next step, we need to get Visual Studio 11 to recognize this file. The easiest way is to add the TestDriven.NET folder to the paths that Visual Studio looks searches for addins.

To do this, open Visual Studio 11, Go to Tools->Options, then from the left tree view, browse to Environment->Add-in Security


Click, Add, and enter the folder of TestDriven.NET installation on your machine, where the .addIn files were found, and press OK


You should be able to see the folder down the list, and press OK to save the change.


You may get a messaging saying you need to restart Visual Studio for the changes to take place.

Restart Visual Studio, then go to Tools->Add-in Manager. You’ll find TestDriven.NET in there, make sure it’s enabled (or enable it by ticking the check-boxes) as below:


Now, your Test Driven.NET addin should work nicely.




Remember, you can apply the same to any .AddIn Visual Studio plug-in.


Have fun Smile