AppDomain.Unload() problem
-
I´m trying to dynamically load and unload assembly. The load part works just fine, but there are some problems with the unload part. It seems that the calling assembly didn´t release the dynamically loaded assembly, because I can´t recompile it. Here is sample of my code: AppDomain ad = AppDomain.CreateDomain("TestDomain"); Assembly a = ad.Load(Assembly.LoadFile(@"D:\Test.dll").GetName()); . . some code . . AppDomain.Unload(ad); Can anyone help me with this?
cellardoor
-
I´m trying to dynamically load and unload assembly. The load part works just fine, but there are some problems with the unload part. It seems that the calling assembly didn´t release the dynamically loaded assembly, because I can´t recompile it. Here is sample of my code: AppDomain ad = AppDomain.CreateDomain("TestDomain"); Assembly a = ad.Load(Assembly.LoadFile(@"D:\Test.dll").GetName()); . . some code . . AppDomain.Unload(ad); Can anyone help me with this?
cellardoor
Did your app really exit ? or does it still show in Task Manager ? (probably because one of its foreground threads did not finish, because it isnt done yet, or you forgot to make it a background thread). :)
Luc Pattyn
try { [Search CP Articles] [Search CP Forums] [Forum Guidelines] [My Articles] } catch { [Google] }