Electronize start command throws unhandled exception #428

Closed
opened 2026-01-29 16:39:27 +00:00 by claunia · 4 comments
Owner

Originally created by @gugu93 on GitHub (Dec 13, 2019).

Originally assigned to: @robertmuehsig on GitHub.

Hi everybody,

When I want to start simple Electron application I'm getting the following error:

Invoke electron.cmd - in dir: \...\obj\Host\node_modules\.bin
Unhandled exception. System.AggregateException: One or more errors occurred. (The directory name is invalid.)
 ---> System.ComponentModel.Win32Exception (267): The directory name is invalid.
   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at ElectronNET.CLI.ProcessHelper.CmdExecute(String command, String workingDirectoryPath, Boolean output, Boolean waitForExit) in D:\Code\GitHub\Electron.NET\ElectronNET.CLI\ProcessHelper.cs:line 81
   at ElectronNET.CLI.Commands.StartElectronCommand.<ExecuteAsync>b__12_0() in D:\Code\GitHub\Electron.NET\ElectronNET.CLI\Commands\StartElectronCommand.cs:line 113
   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 D:\Code\GitHub\Electron.NET\ElectronNET.CLI\Program.cs:line 59

What would be a reason? Why the Electron pointing at location which does not exist like: D:\Code\GitHub\Electron.NET\ElectronNET.CLI\Commands\StartElectronCommand.cs

Originally created by @gugu93 on GitHub (Dec 13, 2019). Originally assigned to: @robertmuehsig on GitHub. Hi everybody, When I want to start simple Electron application I'm getting the following error: ``` Invoke electron.cmd - in dir: \...\obj\Host\node_modules\.bin Unhandled exception. System.AggregateException: One or more errors occurred. (The directory name is invalid.) ---> System.ComponentModel.Win32Exception (267): The directory name is invalid. at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at ElectronNET.CLI.ProcessHelper.CmdExecute(String command, String workingDirectoryPath, Boolean output, Boolean waitForExit) in D:\Code\GitHub\Electron.NET\ElectronNET.CLI\ProcessHelper.cs:line 81 at ElectronNET.CLI.Commands.StartElectronCommand.<ExecuteAsync>b__12_0() in D:\Code\GitHub\Electron.NET\ElectronNET.CLI\Commands\StartElectronCommand.cs:line 113 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 D:\Code\GitHub\Electron.NET\ElectronNET.CLI\Program.cs:line 59 ``` What would be a reason? Why the Electron pointing at location which does not exist like: D:\Code\GitHub\Electron.NET\ElectronNET.CLI\Commands\StartElectronCommand.cs
claunia added the bug label 2026-01-29 16:39:27 +00:00
Author
Owner

@Drawserqzez commented on GitHub (Dec 18, 2019):

Might be that you don't have npm installed? I had this issue as well before noticing I didn't have npm installed.

@Drawserqzez commented on GitHub (Dec 18, 2019): Might be that you don't have npm installed? I had this issue as well before noticing I didn't have npm installed.
Author
Owner

@frogcrush commented on GitHub (Apr 4, 2020):

I'm also having this issue, and I do have npm installed. Interestingly, if I run "electronize start" from the project directory, it works, however using the Visual Studio debug option does not. I'm wondering if the working directory is incorrect for the Visual Studio menu item by default?

@frogcrush commented on GitHub (Apr 4, 2020): I'm also having this issue, and I do have npm installed. Interestingly, if I run "electronize start" from the project directory, it works, however using the Visual Studio debug option does not. I'm wondering if the working directory is incorrect for the Visual Studio menu item by default?
Author
Owner

@GregorBiswanger commented on GitHub (May 10, 2020):

The Visual Studio debug option is unfortunately a prototype.
https://github.com/ElectronNET/Electron.NET/issues/13

@GregorBiswanger commented on GitHub (May 10, 2020): The Visual Studio debug option is unfortunately a prototype. https://github.com/ElectronNET/Electron.NET/issues/13
Author
Owner

@daxnet commented on GitHub (May 10, 2020):

I am having the exact same issue here, with ElectronNET.CLI Version: 8.31.1.0, even if I run the electronize start from command line.
Looks like it is not related to the debug options.

@daxnet commented on GitHub (May 10, 2020): I am having the exact same issue here, with ElectronNET.CLI Version: 8.31.1.0, even if I run the `electronize start` from command line. Looks like it is not related to the debug options.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#428