build retry bug #606

Closed
opened 2026-01-29 16:43:57 +00:00 by claunia · 2 comments
Owner

Originally created by @312977 on GitHub (Nov 23, 2020).

Originally assigned to: @GregorBiswanger on GitHub.

9.0.5

  • Version: 9.0.5

3.1

  • Target:
    windows 32 x64

Steps to Reproduce:

  1. i use cmd: electronize build /target win ,its a long time , waiting.... when i ctrl+c end of this cmd,
    and then a try electronize build /target win agin ,i get an error:
    i must to reatart computer to fix it.

Build Electron Application...
Build ASP.NET Core App for win-x64...
Unhandled exception. System.AggregateException: One or more errors occurred. (The process cannot access the file '\?\D:\code\合智项目\ToolCabinet\obj\desktop\win' because it is being used by another process.)
---> System.IO.IOException: The process cannot access the file '\?\D:\code\合智项目\ToolCabinet\obj\desktop\win' because it is being used by another process.
at System.IO.FileSystem.RemoveDirectoryInternal(String fullPath, Boolean topLevel, Boolean allowDirectoryNotEmpty)
at System.IO.FileSystem.RemoveDirectoryRecursive(String fullPath, WIN32_FIND_DATA& findData, Boolean topLevel)
at System.IO.FileSystem.RemoveDirectory(String fullPath, Boolean recursive)
at System.IO.Directory.Delete(String path, Boolean recursive)
at ElectronNET.CLI.Commands.BuildCommand.b__19_0() in C:_WorkRepos\Electron.NET\ElectronNET.CLI\Commands\BuildCommand.cs:line 88
at System.Threading.Tasks.Task1.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj) at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location where exception was thrown --- at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at ElectronNET.CLI.Program.Main(String[] args) in C:_WorkRepos\Electron.NET\ElectronNET.CLI\Program.cs:line 59

Originally created by @312977 on GitHub (Nov 23, 2020). Originally assigned to: @GregorBiswanger on GitHub. <!-- Please search existing issues to avoid creating duplicates. --> 9.0.5 <!-- Which version of Electron.NET CLI and API are you using? --> <!-- Please always try to use latest version before report. --> * **Version**: 9.0.5 <!-- Which version of .NET Core and Node.js are you using (if applicable)? --> 3.1 <!-- What target are you building for? --> * **Target**: windows 32 x64 <!-- Enter your issue details below this comment. --> <!-- If you want, you can donate to increase issue priority (https://donorbox.org/electron-net) --> Steps to Reproduce: 1. i use cmd: electronize build /target win ,its a long time , waiting.... when i ctrl+c end of this cmd, and then a try electronize build /target win agin ,i get an error: i must to reatart computer to fix it. Build Electron Application... Build ASP.NET Core App for win-x64... Unhandled exception. System.AggregateException: One or more errors occurred. (The process cannot access the file '\\?\D:\code\合智项目\ToolCabinet\obj\desktop\win' because it is being used by another process.) ---> System.IO.IOException: The process cannot access the file '\\?\D:\code\合智项目\ToolCabinet\obj\desktop\win' because it is being used by another process. at System.IO.FileSystem.RemoveDirectoryInternal(String fullPath, Boolean topLevel, Boolean allowDirectoryNotEmpty) at System.IO.FileSystem.RemoveDirectoryRecursive(String fullPath, WIN32_FIND_DATA& findData, Boolean topLevel) at System.IO.FileSystem.RemoveDirectory(String fullPath, Boolean recursive) at System.IO.Directory.Delete(String path, Boolean recursive) at ElectronNET.CLI.Commands.BuildCommand.<ExecuteAsync>b__19_0() in C:\_WorkRepos\Electron.NET\ElectronNET.CLI\Commands\BuildCommand.cs:line 88 at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj) at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location where exception was thrown --- at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task`1.get_Result() at ElectronNET.CLI.Program.Main(String[] args) in C:\_WorkRepos\Electron.NET\ElectronNET.CLI\Program.cs:line 59
claunia added the bug label 2026-01-29 16:43:57 +00:00
Author
Owner

@timjnewton commented on GitHub (Sep 22, 2022):

was there a fix for this? Getting a very similar error as above when I run "electronize build /target win". I've installed the latest version of the dotnet SDK (6.0.401) (6.0.9) and have a recent version of Electron : ElectronNET.CLI Version: 13.5.1.0

Any help or pointers appreciated. thanks. Full stack trace is below :-

PS C:\Users\tim\Documents\code\electron-test-app> electronize build /target win
Build Electron Application...
Arguments:
target = win
Build ASP.NET Core App for win-x64...
Unhandled exception. System.AggregateException: One or more errors occurred. (Access to the path '\?\C:\Users\tim\Documents\code\electron-test-app\obj\desktop\win\api' is denied.)
---> System.IO.IOException: Access to the path '\?\C:\Users\tim\Documents\code\electron-test-app\obj\desktop\win\api' is denied.
at System.IO.FileSystem.RemoveDirectoryRecursive(String fullPath, WIN32_FIND_DATA& findData, Boolean topLevel)
at System.IO.FileSystem.RemoveDirectory(String fullPath, Boolean recursive)
at System.IO.Directory.Delete(String path, Boolean recursive)
at ElectronNET.CLI.Commands.BuildCommand.b__21_0() in C:_WorkRepos\Electron.NET\ElectronNET.CLI\Commands\BuildCommand.cs:line 96
at System.Threading.Tasks.Task1.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__277_0(Object obj) at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of inner exception stack trace --- at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at ElectronNET.CLI.Program.Main(String[] args) in C:_WorkRepos\Electron.NET\ElectronNET.CLI\Program.cs:line 59
PS C:\Users\tim\Documents\code\electron-test-app> dotnet --version
6.0.401
PS C:\Users\tim\Documents\code\electron-test-app> electronize version
ElectronNET.CLI Version: 13.5.1.0
PS C:\Users\tim\Documents\code\electron-test-app>

@timjnewton commented on GitHub (Sep 22, 2022): was there a fix for this? Getting a very similar error as above when I run "electronize build /target win". I've installed the latest version of the dotnet SDK (6.0.401) (6.0.9) and have a recent version of Electron : ElectronNET.CLI Version: 13.5.1.0 Any help or pointers appreciated. thanks. Full stack trace is below :- PS C:\Users\tim\Documents\code\electron-test-app> electronize build /target win Build Electron Application... Arguments: target = win Build ASP.NET Core App for win-x64... Unhandled exception. System.AggregateException: One or more errors occurred. (Access to the path '\\?\C:\Users\tim\Documents\code\electron-test-app\obj\desktop\win\api' is denied.) ---> System.IO.IOException: Access to the path '\\?\C:\Users\tim\Documents\code\electron-test-app\obj\desktop\win\api' is denied. at System.IO.FileSystem.RemoveDirectoryRecursive(String fullPath, WIN32_FIND_DATA& findData, Boolean topLevel) at System.IO.FileSystem.RemoveDirectory(String fullPath, Boolean recursive) at System.IO.Directory.Delete(String path, Boolean recursive) at ElectronNET.CLI.Commands.BuildCommand.<ExecuteAsync>b__21_0() in C:\_WorkRepos\Electron.NET\ElectronNET.CLI\Commands\BuildCommand.cs:line 96 at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__277_0(Object obj) at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of inner exception stack trace --- at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task`1.get_Result() at ElectronNET.CLI.Program.Main(String[] args) in C:\_WorkRepos\Electron.NET\ElectronNET.CLI\Program.cs:line 59 PS C:\Users\tim\Documents\code\electron-test-app> dotnet --version 6.0.401 PS C:\Users\tim\Documents\code\electron-test-app> electronize version ElectronNET.CLI Version: 13.5.1.0 PS C:\Users\tim\Documents\code\electron-test-app>
Author
Owner

@GregorBiswanger commented on GitHub (Mar 28, 2023):

🎉🚀 New Electron.NET version 23.6.1 released 🚀🎉

With native Electron 23 and .NET 6 support. Your problem should be fixed here. If you continue to have the problem, please let us know. Please note the correct updating of your API & CLI. Info in the README. Have fun!

@GregorBiswanger commented on GitHub (Mar 28, 2023): 🎉🚀 New Electron.NET version 23.6.1 released 🚀🎉 With native Electron 23 and .NET 6 support. Your problem should be fixed here. If you continue to have the problem, please let us know. Please note the correct updating of your API & CLI. Info in the README. Have fun!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#606