I've replaced (and moved) ConsoleRunner in NAnt.Console to be a stub that
creates a new AppDomain (if specified in the config file) so that assemblies
that we load are not locked. This will allow us to develop and deploy
new/existing assemblies for the running version of NAnt.
The code is pretty straight forward and was taken from various MSDN and a
DevX acticle(s):
string nantShadowCopyFilesSetting =
ConfigurationSettings.AppSettings.Get("nant.shadowfiles");
if(nantShadowCopyFilesSetting != null &&
bool.Parse(nantShadowCopyFilesSetting) == true) {
System.AppDomainSetup myDomainSetup = new System.AppDomainSetup();
myDomainSetup.PrivateBinPath = myDomainSetup.ApplicationBase =
AppDomain.CurrentDomain.BaseDirectory;
myDomainSetup.ApplicationName = "NAnt";
myDomainSetup.ShadowCopyFiles = "true";
myDomainSetup.CachePath = Path.Combine(myDomainSetup.ApplicationBase,
"cache");
executionAD = AppDomain.CreateDomain( "Loading new Domain", null,
myDomainSetup);
...
Then ConsoleDriver.Main(...) (in the new appdomain) is called and passed the
string[] args to run. This will allow us to dynamically update the running
version of NAnt (not this startup-stub, but all other assemblies).
Any comments before I check things in?
-------------------------------------------------------
This SF.NET email is sponsored by: Take your first step towards giving
your online business a competitive advantage. Test-drive a Thawte SSL
certificate - our easy online guide will show you how. Click here to get
started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en
_______________________________________________
Nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers