0

I have an addon to visual studio 2010 for our internal purposes. The addon uses 2 libraries we commonly use, but they change time to time. After the studio starts, it loads the libraries into its application domain.

the problem comes when you need to design or build something that is dependent on those 2 libraries. The msbuild or a designer engine in visual studio use the libraries from the addon, not the ones created by build output.

the biggest problems starts when you need to work on 2 different versions/branches and each of them have their own version of libraries.

this causes errors/unexpected behavior of build. also the build result

and here comes the question: Is it somehow possible to load an addon in different application domain or have some kind of versioning in the addon?

Thanks for reading this through and appriciate all your help

Miro

miro smelko
  • 139
  • 6

1 Answers1

0

I do not know if you can tell Visual Studio to load an add-in on a new AppDomain but what you could do is create a new AppDomain from you add-in and then do the core work of your add-in inside the new AppDomain. This means that you should not reference the 2 libraries you mention from the VS add-in assembly. Instead they should be referenced from the assembly that will be loaded only in the new AppDomain.

The core object of you add-in should be derived from MarshalByRefObject which will enable the VS add-in to have access to it.

Panos Rontogiannis
  • 4,154
  • 1
  • 24
  • 29