ConfigurationBuilder in Startup.cs Causes Freeze #51

Open
opened 2026-01-29 16:29:13 +00:00 by claunia · 0 comments
Owner

Originally created by @zlspjp on GitHub (Nov 5, 2017).

Originally assigned to: @robertmuehsig on GitHub.

I have the following code with my Startup.cs to load configuration settings from appsettings.json:
IConfigurationRoot config = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appsettings.json").Build();

If I comment this code out and run dotnet electronize start, everthing runs normally. But with this code in place, when I run dotnet electronize start, package manager starts working through compiling but then hangs here in package manager:

Invoke electron.cmd - in dir: C:\Users\TEST\Documents\Visual Studio 2017\Projects\TESTElecNet\TEST\TEST\obj\Host\node_modules.bin
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Users\Pete\Documents\Visual Studio 2017\Projects\TESTElecNet\TEST\TEST\obj\Host\node_modules.bin>electron.cmd "....\main.js"

stdout: Use Electron Port: 58008

Any ideas? Thanks for your help!

Originally created by @zlspjp on GitHub (Nov 5, 2017). Originally assigned to: @robertmuehsig on GitHub. I have the following code with my Startup.cs to load configuration settings from appsettings.json: ``IConfigurationRoot config = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appsettings.json").Build();`` If I comment this code out and run dotnet electronize start, everthing runs normally. But with this code in place, when I run dotnet electronize start, package manager starts working through compiling but then hangs here in package manager: Invoke electron.cmd - in dir: C:\Users\TEST\Documents\Visual Studio 2017\Projects\TESTElecNet\TEST\TEST\obj\Host\node_modules\.bin Microsoft Windows [Version 6.3.9600] (c) 2013 Microsoft Corporation. All rights reserved. C:\Users\Pete\Documents\Visual Studio 2017\Projects\TESTElecNet\TEST\TEST\obj\Host\node_modules\.bin>electron.cmd "..\..\main.js" stdout: Use Electron Port: 58008 Any ideas? Thanks for your help!
claunia added the question label 2026-01-29 16:29:14 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#51