Problem when app wants to replace "NAppUpdate.Framework.dll"

298 views
Skip to first unread message

Krzysztof Krzaczkowski

unread,
Sep 15, 2014, 1:01:27 PM9/15/14
to nappu...@googlegroups.com
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#L118
Everything works.

I know this is ugly solution.
Maybe do you know better solution of this problem ?



Itamar Syn-Hershko

unread,
Sep 15, 2014, 7:46:34 PM9/15/14
to nappu...@googlegroups.com

What version are you using? Did you compile this from the latest sources?

--
You received this message because you are subscribed to the Google Groups "NAppUpdate" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nappupdate+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Krzysztof Krzaczkowski

unread,
Sep 16, 2014, 5:00:12 AM9/16/14
to nappu...@googlegroups.com
I am using latest version. (downloaded 06.08.2014)

Itamar Syn-Hershko

unread,
Sep 16, 2014, 7:50:21 AM9/16/14
to nappu...@googlegroups.com
Again, just to verify - you downloaded the sources from latest master or the released version?

I will take a look within a couple of days, currently travelling

--

Itamar Syn-Hershko
http://code972.com | @synhershko
Freelance Developer & Consultant

Krzysztof Krzaczkowski

unread,
Sep 16, 2014, 9:29:01 AM9/16/14
to nappu...@googlegroups.com
From latest master.
I will check version from release.
Reply all
Reply to author
Forward
0 new messages