Path cannot be null on init
See original GitHub issueUsing VS 2019, .net core 2.1, Windows 10 Surface Pro on an ASP.NET Core app, when I run electronize init
(via command prompt) I receive the following error:
C:\source\repos\TranslationMessageManager>electronize init
Adding our config file to your project...
Search your .csproj to add the needed electron.manifest.json...
Found your .csproj: - check for existing config or update it.
Unhandled Exception: System.AggregateException: One or more errors occurred. (Path cannot be null.
Parameter name: path) ---> System.ArgumentNullException: Path cannot be null.
Parameter name: path
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at ElectronNET.CLI.Commands.InitCommand.EditCsProj(String projectFile) in D:\Code\GitHub\Electron.NET\ElectronNET.CLI\Commands\InitCommand.cs:line 126
at ElectronNET.CLI.Commands.InitCommand.<ExecuteAsync>b__10_0() in D:\Code\GitHub\Electron.NET\ElectronNET.CLI\Commands\InitCommand.cs:line 74
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at ElectronNET.CLI.Program.Main(String[] args) in D:\Code\GitHub\Electron.NET\ElectronNET.CLI\Program.cs:line 54
There isn’t anything in that message that makes it clear to me what might be going on here - just figured I would report it in here in case it makes sense to someone on the team 😃
Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Comments:9
Top Results From Across the Web
How to fix: Value cannot be null. Parameter name: path
Looks like it's problem with your GetProtocolPath() . pathBuilder not return path format.
Read more >Value cannot be null.", "Parameter name: path" - Support ...
I've received this error a few times now. I can repair the database successfully, and have completed at least one manual backup after...
Read more >Value cannot be null. Parameter name: format visual studio ...
In my case, I start VS2022 and from the "Open Recent" panel Create a New Project (Windows Forms App using .NET 6.0). Project...
Read more >System.ArgumentNullException: Value cannot be null
I use the assign activity to tell it that “FilStiDokument” is the path(as string) it has to use. Then I invoke the workflow...
Read more >Understanding null safety
If a function has a non-nullable return type, then every path through the function must reach a return statement that returns a value....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I could resolve a problem. I m should be in the folder where are the Startup.cs and Program.cs when I execute this commands. I expect that this resolve yours problems too.
So here’s the thing:
At the following step:
At the first time, you need an Electron.NET project initialization. Type the following command in your ASP.NET Core folder:
Be sure you cd to the correct folder in advance:
So if your folder structure is:
Then in the Terminal do this: