VS.NET Add-In AppDomain Problem
From: Andy Maggs (andy65_at_community.nospam)
Date: 03/09/05
- Previous message: ThunderMusic: "Re: Is it possible through remoting to pass a reference to a control?"
- Next in thread: Sergey M: "Re: VS.NET Add-In AppDomain Problem"
- Reply: Sergey M: "Re: VS.NET Add-In AppDomain Problem"
- Reply: Andy Maggs: "Re: VS.NET Add-In AppDomain Problem"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 9 Mar 2005 17:22:29 -0000
Hi,
We have an add-in that has been developed in 1.0 managed code (C# + VB.NET)
to review the source code currently loaded into the IDE for coding standards
compliance. We have implemented a solution whereby the user is able to
write VB.NET script that interacts with an object model that we provide in
order that they can define their own standards. This script is compiled
into an in-memory assembly at review time. To reduce the work that was
required to develop the language source code parsers we opted for a solution
that extracted some information from the compiled assemblies which are
loaded by reflection. Because of the inability to unload assemblies from an
AppDomain, we have had to develop a solution that compiles, loads and
reviews source code in a secondary AppDomain so that the whole AppDomain can
then be unloaded when the review completes thus releasing the memory used
and any file system locks. However, and here is the problem, when the
secondary AppDomain is released, the whole of the Visual Studio.NET 2002
process is unloaded immediately without any exceptions, errors or warnings
of any kind. We thought we had found a solution by calling the
AppDomain.Unload method from a timer elapsed event handler 10 seconds after
the review had finished and although VS.NET did not unload, all was not well
because if we then attempted to perform a second review the whole VS.NET
process unloaded again shortly after the secondary AppDomain was created.
We experience the same problem when performing a review with the same add-in
in VS.NET 2003.
I have searched extensively using Google and cannot find anyone else
mentioning this problem, so my question is: Is this a known issue with
AppDomains in VS.NET 2002/2003 and if so is there a work-around? All
assistance gratefully received.
I posted to both the extensibility and remoting groups because the problem
involves both areas and experts in either may be able to help.
Kind Regards
Andy Maggs
Visible Progress Technologies Limited
Empowering software developers in the pursuit of software excellence through
the provision of process automation and productivity tools.
http://www.visibleprogress.com
- Previous message: ThunderMusic: "Re: Is it possible through remoting to pass a reference to a control?"
- Next in thread: Sergey M: "Re: VS.NET Add-In AppDomain Problem"
- Reply: Sergey M: "Re: VS.NET Add-In AppDomain Problem"
- Reply: Andy Maggs: "Re: VS.NET Add-In AppDomain Problem"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|