Hi,
I get error when my app wants to replace "NAppUpdate.Framework.dll".
During update process, when files are replaced by "NAppUpdate.Updater" process I get exception:
2014 18:14:21.217 Error
Could not replace the file
System.UnauthorizedAccessException: Access to the path '...\bin\Debug\NAppUpdate.Framework.dll' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.Delete(String path)
at NAppUpdate.Framework.Tasks.FileUpdateTask.Execute(Boolean coldRun)
15.09.2014 18:14:21.217 Debug Task execution failed
15.09.2014 18:14:22.791 Error Update failed
This is caused because my app uses this file, but when I add this:
Thread.Sleep(100);
In place
https://github.com/synhershko/NAppUpdate/blob/master/src/NAppUpdate.Updater/AppStart.cs#L118Everything works.
I know this is ugly solution.
Maybe do you know better solution of this problem ?