electronize init #663

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

Originally created by @bbhxwl on GitHub (May 18, 2021).

Originally assigned to: @GregorBiswanger on GitHub.

9.31.2 net core 3.1

  • Version:
  • Target:
  1. Error when running electronize init
    Unhandled exception. System.AggregateException: One or more errors occurred. (Path cannot be null. (Parameter 'path'))
Originally created by @bbhxwl on GitHub (May 18, 2021). Originally assigned to: @GregorBiswanger on GitHub. <!-- Please search existing issues to avoid creating duplicates. --> <!-- Which version of Electron.NET CLI and API are you using? --> 9.31.2 net core 3.1 <!-- Please always try to use latest version before report. --> * **Version**: <!-- Which version of .NET Core and Node.js are you using (if applicable)? --> <!-- What target are you building for? --> * **Target**: <!-- Enter your issue details below this comment. --> <!-- If you want, you can donate to increase issue priority (https://donorbox.org/electron-net) --> 1. Error when running electronize init Unhandled exception. System.AggregateException: One or more errors occurred. (Path cannot be null. (Parameter 'path'))
claunia added the bug label 2026-01-29 16:45:27 +00:00
Author
Owner

@magom001 commented on GitHub (May 22, 2021):

mac os

.NET Core SDK (reflecting any global.json):
 Version:   3.1.409
 Commit:    217439b5ae

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.16
 OS Platform: Darwin
 RID:         osx.10.16-x64
 Base Path:   /usr/local/share/dotnet/sdk/3.1.409/

Host (useful for support):
  Version: 3.1.15
  Commit:  dc339bd0fb

.NET Core SDKs installed:
  3.1.409 [/usr/local/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.App 3.1.15 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.15 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Local packages:

$ dotnet list package
Project '***' has the following package references
   [netcoreapp3.1]: 
   Top-level Package                           Requested   Resolved
   > AntDesign                                 0.8.1       0.8.1   
   > ElectronNET.API                           9.31.2      9.31.2  
   > Microsoft.EntityFrameworkCore.Sqlite      5.0.6       5.0.6   
   > Microsoft.EntityFrameworkCore.Tools       5.0.6       5.0.6   

Running dotnet run electronize init does not generate electron.manifest.json.

Instead a localhost instance is launched.

@magom001 commented on GitHub (May 22, 2021): mac os ```$ dotnet --info .NET Core SDK (reflecting any global.json): Version: 3.1.409 Commit: 217439b5ae Runtime Environment: OS Name: Mac OS X OS Version: 10.16 OS Platform: Darwin RID: osx.10.16-x64 Base Path: /usr/local/share/dotnet/sdk/3.1.409/ Host (useful for support): Version: 3.1.15 Commit: dc339bd0fb .NET Core SDKs installed: 3.1.409 [/usr/local/share/dotnet/sdk] .NET Core runtimes installed: Microsoft.AspNetCore.App 3.1.15 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.1.15 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] ``` Local packages: ``` $ dotnet list package Project '***' has the following package references [netcoreapp3.1]: Top-level Package Requested Resolved > AntDesign 0.8.1 0.8.1 > ElectronNET.API 9.31.2 9.31.2 > Microsoft.EntityFrameworkCore.Sqlite 5.0.6 5.0.6 > Microsoft.EntityFrameworkCore.Tools 5.0.6 5.0.6 ``` Running `dotnet run electronize init` does not generate `electron.manifest.json`. Instead a localhost instance is launched.
Author
Owner

@mbparker commented on GitHub (Jun 20, 2021):

dotnet electronize init

@mbparker commented on GitHub (Jun 20, 2021): dotnet electronize init
Author
Owner

@mbielski commented on GitHub (Jun 8, 2022):

I am having this same issue. Output is:

`PS C:\Users\micha\source\repos\ElectronTest> electronize init
Arguments:

Adding our config file to your project...
Search your .csproj/fsproj to add the needed electron.manifest.json...
Found your : - check for existing config or update it.
Unhandled exception. System.AggregateException: One or more errors occurred. (Path cannot be null. (Parameter 'path'))
---> System.ArgumentNullException: Path cannot be null. (Parameter 'path')
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.IO.File.Open(String path, FileMode mode, FileAccess access)
at ElectronNET.CLI.Commands.InitCommand.EditProjectFile(String projectFile) in C:_WorkRepos\Electron.NET\ElectronNET.CLI\Commands\InitCommand.cs:line 166
at ElectronNET.CLI.Commands.InitCommand.<>c.b__13_0() in C:_WorkRepos\Electron.NET\ElectronNET.CLI\Commands\InitCommand.cs:line 88
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.Task1.get_Result() at ElectronNET.CLI.Program.Main(String[] args) in C:\_WorkRepos\Electron.NET\ElectronNET.CLI\Program.cs:line 59

The main problem that I can see is that the C:_WorkRepos\Electron.NET\ElectronNET.CLI\Commands\ folder does not exist on my machine. I've installed the CLI globally, added the API to the project, and the project builds fine. Electron appears to be looking for paths that do not exist but maybe should?

@mbielski commented on GitHub (Jun 8, 2022): I am having this same issue. Output is: `PS C:\Users\micha\source\repos\ElectronTest> electronize init Arguments: Adding our config file to your project... Search your .csproj/fsproj to add the needed electron.manifest.json... Found your : - check for existing config or update it. Unhandled exception. System.AggregateException: One or more errors occurred. (Path cannot be null. (Parameter 'path')) ---> System.ArgumentNullException: Path cannot be null. (Parameter 'path') at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at System.IO.File.Open(String path, FileMode mode, FileAccess access) at ElectronNET.CLI.Commands.InitCommand.EditProjectFile(String projectFile) in C:\_WorkRepos\Electron.NET\ElectronNET.CLI\Commands\InitCommand.cs:line 166 at ElectronNET.CLI.Commands.InitCommand.<>c.<ExecuteAsync>b__13_0() in C:\_WorkRepos\Electron.NET\ElectronNET.CLI\Commands\InitCommand.cs:line 88 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` The main problem that I can see is that the C:\_WorkRepos\Electron.NET\ElectronNET.CLI\Commands\ folder does not exist on my machine. I've installed the CLI globally, added the API to the project, and the project builds fine. Electron appears to be looking for paths that do not exist but maybe should?
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!
Author
Owner

@ghost commented on GitHub (Sep 4, 2023):

Boa noite , estou tendo o mesmo poblema ,como você adicionei a API ao projeto e o projeto ?

@ghost commented on GitHub (Sep 4, 2023): Boa noite , estou tendo o mesmo poblema ,como você adicionei a API ao projeto e o projeto ?
Author
Owner

@LapinskasL commented on GitHub (Jun 24, 2024):

@GregorBiswanger I'm still having an issue with it. I'm on .NET 8 with MVC and electronize init still throws System.AggregateException: One or more errors occurred. (Path cannot be null. (Parameter 'path')).

However, it does generate the electron.manifest.json file in the solution folder, but then electronize start throws an error about it not being able to find the module, meaning the electron.manifest.json file.

@LapinskasL commented on GitHub (Jun 24, 2024): @GregorBiswanger I'm still having an issue with it. I'm on .NET 8 with MVC and `electronize init` still throws _System.AggregateException: One or more errors occurred. (Path cannot be null. (Parameter 'path'))_. However, it does generate the electron.manifest.json file in the solution folder, but then `electronize start` throws an error about it not being able to find the module, meaning the electron.manifest.json file.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#663