Friday, 25 March 2011

Visual Studio coexistence - avec COM

Sorry, another boring one about info that's not easily available on the internet.

Added an extra version of Visual Studio recently and my COM-based ruby tool-kit for talking to Visual Studio (so I never need to use the (yuch) IDE) started popping the wrong version.

The link below has mixed solutions - most other internet references describe the "Microsoft Visual Studio Version Selector" which is registered for .sln files, which should detect the correc version or otherwise ask the user to choose. However this doesn't seem to apply to opening a solution via COM by "connecting" to it.

The "top" solution on the link below is probably a bit hacky for general use - Version Selector seems more sensible, however Version Selector doesn't work for COM object lookup.

So to summarise - choose your default by writing the registry value at:
HKLM\Software\Microsft\Windows\CurrentVersion\App Paths\devenv.exe
With thanks to the posters at: http://social.msdn.microsoft.com/Forums/eu/vssetup/thread/568e32af-d724-4ac6-8e8f-72181c4320b3