mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-04-28 17:11:14 +00:00
implement electron build with electron-packager into build.cmd and change the current root path from WebApp
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
using Microsoft.AspNetCore;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using System.IO;
|
||||
using System;
|
||||
|
||||
namespace ElectronNET.WebApp
|
||||
{
|
||||
@@ -11,9 +11,11 @@ namespace ElectronNET.WebApp
|
||||
BuildWebHost(args).Run();
|
||||
}
|
||||
|
||||
// WICHTIG! UseContentRoot auf Assembly Ordner Essentiell!
|
||||
// Ggf. kann man via Parameter den Content Root durchreichen?
|
||||
public static IWebHost BuildWebHost(string[] args) =>
|
||||
WebHost.CreateDefaultBuilder(args)
|
||||
.UseContentRoot(Path.Combine(Directory.GetCurrentDirectory(), "..", "ElectronNET.WebApp"))
|
||||
.UseContentRoot(AppDomain.CurrentDomain.BaseDirectory)
|
||||
.UseStartup<Startup>()
|
||||
.Build();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user