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

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -