Blank WebApp fails to start #4

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

Originally created by @robertmuehsig on GitHub (Oct 18, 2017).

Repo:
Create new ASP.NET Core 2.0 webapp
Install API & CLI Package
dotnet initialize init
dotnet initalize build

=> open ElectronNET.Host.exe

Nothing happens :(

Originally created by @robertmuehsig on GitHub (Oct 18, 2017). Repo: Create new ASP.NET Core 2.0 webapp Install API & CLI Package dotnet initialize init dotnet initalize build => open ElectronNET.Host.exe Nothing happens :(
Author
Owner

@GregorBiswanger commented on GitHub (Oct 18, 2017):

Do you add the UseElectron extension in Program.cs?

public static IWebHost BuildWebHost(string[] args) => WebHost.CreateDefaultBuilder(args).UseStartup<Startup>().UseElectron(args).Build();

And open a Window in Startup.cs?

Electron.WindowManager.CreateWindowAsync();

@GregorBiswanger commented on GitHub (Oct 18, 2017): Do you add the UseElectron extension in Program.cs? `public static IWebHost BuildWebHost(string[] args) => WebHost.CreateDefaultBuilder(args).UseStartup<Startup>().UseElectron(args).Build();` And open a Window in Startup.cs? `Electron.WindowManager.CreateWindowAsync();`
Author
Owner

@robertmuehsig commented on GitHub (Oct 19, 2017):

Works!

But: We need to add the UseElectron(args) method in your readme @GregorBiswanger (currently it is missing and without it, it doesn't work)

  public static IWebHost BuildWebHost(string[] args) =>
            WebHost.CreateDefaultBuilder(args)
                .UseStartup<Startup>()
                .UseElectron(args)
                .Build();
@robertmuehsig commented on GitHub (Oct 19, 2017): Works! But: We need to add the UseElectron(args) method in your readme @GregorBiswanger (currently it is missing and without it, it doesn't work) ``` public static IWebHost BuildWebHost(string[] args) => WebHost.CreateDefaultBuilder(args) .UseStartup<Startup>() .UseElectron(args) .Build(); ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#4