Archive for the ‘Visual+Studio’ Category

Syncing Visual Studio Extensions and Settings with Dropbox



Sparked by a long wish for keeping my Visual Studio extensions and settings in sync across multiple computers, and a discussion with @kellabyte and @ackenpacken yesterday, I started to research how this could be done.

With a quick Google search, I found this blog post by the Visual Studio team, describing where Visual Studio 2010 looks for its extensions. The blog post specified \Common7\IDE\devenv.pkgdef as the file to modify in order to load extensions from additional places than the default ones you get “out of the box”. Further down in the blog post, PkgDefSearchPath was listed, and it seemed like a good to add a folder controlled by Dropbox. On my computers, this would typically be C:\Users\larsw\Dropbox\Visual Studio Settings and Extensions.

Before you start poking around in the file, I suggest you take a backup of the original one, in case of any f*ckups. As you can see from the default entry, it contains three paths in a semi colon separated list. I just apppended my chosen folder to the end of this list like:

C:\Users\larsw\Dropbox\Visual Studio Settings and Extensions”

Before you start editing the file, I suggest you shut down all instances of Visual Studio, so the likelihood that the file won’t be write-protected or changed is minimal.

Migrating existing extensions

In the same pkgdef file, UserExtensionsRootFolder points at the default location for user-defined extensions – in my case, it points to c:\Users\larsw\AppData\Local\Microsoft\VisualStudio\10.0\Extensions. I chose to move all the sub folders (containing extensions) into my newly created Visual Studio Settings and Extensions folder controlled by Dropbox. As for the extensions located in the folder defined by ApplicationExtensionsFolder, I chose to let them be for know, because I suspect that they are having dependencies on native components etc. There were a lot of Microsoft default extensions, as well as JetBrains Resharper etc. located in the folder.


On my other computers, I had to update the same pkgdef file, let Dropbox sync the folder, start Visual Studio – & voila! The same extensions were present Smile

As for Visual Studio settings, it’s a supported functionality out of the box to share settings between Visual Studio instances across machines via (typically) a file share. The same functionality can of course be used with Dropbox. Go to Tools –> Options –> Environment –> Import and Export Settings, and point to a location inside the same Dropbox-controlled folder.


Solution: Add Service Reference does not always work properly in WF4 scenarios

No Comments »

Now, the title is a bit cryptic, so let me elaborate; earlier this week, I noticed that when I tried to add a service reference to a WCF Workflow service in the same ASP.NET Web Application, I didn’t get the expected result; custom activities for the service operations in the toolbox (when designing another WF Service).

Investigating further, I created a Workflow Console Application and checked if I got the same behavior; no – it worked perfectly. Same happened when I tried it with WCF Workflow Service Application / Declarative Service Library (Visual Studio templates).

Putting one and one together, I guessed that it had something about the definition of the project template. Visual Studio projects has a concept of ProjectTypeGuids that enables/disables specific features for a project once added. A couple of years ago, I noticed that I had to add a specific GUID in order to wire in the “F5 experience” when debugging WCF libraries.

When comparing the GUIDs set in one of the working projects with the ones in the ASP.NET Web Application, I noticed the following (magic number):


I retrofitted the GUID in the Web Application, added a service reference to a workflow service;


Building the project and presto! — custom activities for the service operations in the toolbox.

Now, this isn’t just a problem that can happen when using Workflow Services, it can also happen (as I’ve already mentioned) to WCF projects, test project et cetera too. My suggestion to Microsoft is that they in the future add an section somewhere in the Options pages where it is possible to turn on/off features like this one, so developers don’t need to turn autistic and start remembering a large set of project type GUIDs :-) (Oh, no offense to devs (or others) that actually are autistic).

Thanks @mwinkle for putting me in touch with the Add Service Reference guys, even though I found the workaround first :-)

Pimp my Visual Studio (2008)


Here’s my list of addins an customizations to Visual Studio 2008 that I currently use:


  • Jetbrains Resharper 4.1 – Description should be unnecessary.
  • dotTrace 3.1 – Performance/Memory profiling – works well together will R#
  • PowerCommands for VS2008 – A couple of nifty commands; especially copy/paste assembly references between projects. (I believe the former name for this addin was CoolCommands).
  • Visual Studio Properties Window Search/Find plugin – Adds a textbox to the property grid, that enables you to quickly filter and find a specific property in the list. To install this one, you need to change the 8.0 in the .Addin file to 9.0, and all the files from the archive into the Addins subfolder of My Documents\Visual Studio 2008 (Create one if it’s not present).
  • Clone Detective – Just installed this one. The reports says that it actually quite good at detecting “cut’n’pasted” code section, and helps you identify what you can factor out.
  • Lexware Assembly Reference Tool for Visual Studio – Great addin for sorting out / cleaning up assembly references. (Before I found this tool, in multi-solution scenarioes I had to open the project files and change the bin\Debug or bin\Release part of the references with bin\$(Configuration) by hand.
  • AnkhSVN – Adds Subversion Source Control Management features to Visual Studio. Open source / free.

    Color themes and fonts

  • Theme: Ragnarok Blue
  • Theme: Faculty of the mind
  • Font: Envy Code R
  • Font: Lucida Console 14pt
  • Font: Consolas

Templates and snippets

I have some custom WCF related project & solution templates as well as a  couple of snippets that I will polish & publish later.

Shortcuts that I can’t live without

  • ctrl+. or shift-alt-F10: multi purpose; typically infer usings of types.
  • alt-enter: R# Swiss army knife shortcut
  • [ctrl-k, ctrl-c] and [ctrl-k, ctrl-u]: Comment/uncomment section.
  • [ctrl-m, ctrl-m], [ctrl-m, ctrl-l] and [ctrl-m, ctrl-o] Collapse/Expand sections.
  • shift-alt-Enter: Full screen – code is king!

So,  I’m really interested to hear what other people uses and if there are some obvious things missing from my list.

I’m tagging the following persons and ask about their opinions:

New PDC’08 sessions published – 10 is the new 6!

No Comments »

Found out through the PDC’08 Facebook group today that they have published 16 sessions. A couple of weeks ago, I read on Don Box’ blog that 10 is the new 6 but I didn’t exactly understand why. It is a mantra of the VC++ team and is refering to the long-living version 6 (with a lot of service packs) of Visual Studio. I am not sure if this is a signal that they want to stabilize around the upcoming (upcoming, like in next year or so) version 10 / Rosario of VSTS.

Read more here: