c# - How to not lock two files with Assembly.Load -
c# - How to not lock two files with Assembly.Load -
if re-create file
file.copy(src, dst);
and load copy
var asm = assembly.loadfile(dst);
why both files locked process?
if delete src before load dst, , recopy dst src desired end result. delete , re-create seem little unnecessary.
file.copy(src, dst); file.delete(src); var asm = assembly.loadfrom(dst); file.copy(dst, src);
yes building plugin-design application. yes using appdomains shadow re-create (http://msdn.microsoft.com/en-us/library/ms404279.aspx). yes have manage own type cache (as each assembly load give different type far appdomain concerned). these not answers question.
note src , dst strings. no other stream opened on files.
it may source file in assembly resolution path application, , loaded automatically. seek making src c:\temp
or other path has nil application's folder, , see if same thing occurs.
c#
Comments
Post a Comment