devoured elysium
devoured elysium

Reputation: 105037

How do you develop Visual Studio Add-Ins?

I have a vague idea Visual Studio allows you to run a second sandboxed instance where the add-in is being in fact loaded. That'd allow you to debug your add-in code and such.

Is this effectively possible? How would I go about doing that?

I'm currently using a single instance of Visual Studio. I'm having the problem that as I load and run the add-in, it won't allow me to compile again until I restart that instance of Visual Studio as there seems to be no way to unload the add-in. Even using two instances of Visual Studio wouldn't really help in here. There must be an easier way, how do you guys do it?

Thanks

Upvotes: 5

Views: 369

Answers (3)

John B
John B

Reputation: 20350

In my opinion, finding information on this topic is hard. There are a lot of "Hello World" type examples, but most of them are uninformative, misleading, incomplete or outdated. Not to mention the fact that the whole architecture is different from what most people might be used to with managed code development since COM is involved with at least with one of the development methods (there are multiple).

Professional Visual Studio 2010 has a brief primer that should point you in the right direction.

There is also Professional Visual Studio Extensisbility (from 2008) that might be a little outdated, but from what I understand most of the major concepts still apply.

Hope that helps.

Upvotes: 0

Aaron Marten
Aaron Marten

Reputation: 6568

One useful tip: you can disable all add-ins by holding down the left-shift key when VS starts. You can do this for your "debugger" instance and let the add-in load in the "debugee" instance.

Upvotes: 1

mfeingold
mfeingold

Reputation: 7154

I would recommend to download Visual Studio SDK for the VS version you are using i.e. VS2010.

All you need is to run the second instance of VS in the experimental hive. There is a command line switch rootsuffix which takes one parameter - the name of the experimental hive (usually Exp). If you start VS with this key it will create a separate hive in the registry by cloning whatever is necessary from the standard VS hive.

You can register/add your plugins/packages/whatever in the experimental hive, while your workhorse - main hive remains clean and unaffected

This is a good idea even if you ignore your headache with the locked dlls. One thing it is not too difficult to mess up the registry really bad - so VS wont even start. You do not want this to happen with your main hive. And if ti happens with the experimental - well - you can always recreate it - there is a utility for that included in the SDK

Upvotes: 4

Related Questions