Skip to content

Commit 74cc7d6

Browse files
committed
Upgraded to aspnetcore 2.2 and electron.net 0.0.11
1 parent a77e6cd commit 74cc7d6

File tree

3 files changed

+11
-16
lines changed

3 files changed

+11
-16
lines changed

ElectronNET-API-Demos/Controllers/ShortcutsController.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using ElectronNET.API;
1+
using System.Threading.Tasks;
2+
using ElectronNET.API;
23
using ElectronNET.API.Entities;
34
using Microsoft.AspNetCore.Mvc;
45

@@ -21,7 +22,7 @@ public IActionResult Index()
2122
await Electron.Dialog.ShowMessageBoxAsync(options);
2223
});
2324

24-
Electron.App.WillQuit += () => Electron.GlobalShortcut.UnregisterAll();
25+
Electron.App.WillQuit += arg => Task.Run(() => Electron.GlobalShortcut.UnregisterAll());
2526
}
2627

2728
return View();

ElectronNET-API-Demos/ElectronNET-API-Demos.csproj

+5-10
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project Sdk="Microsoft.NET.Sdk.Web">
33
<PropertyGroup>
4-
<TargetFramework>netcoreapp2.0</TargetFramework>
4+
<TargetFramework>netcoreapp2.2</TargetFramework>
55
</PropertyGroup>
66
<ItemGroup>
7-
<PackageReference Include="ElectronNET.API" Version="0.0.6" />
8-
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
9-
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.0.0" />
10-
</ItemGroup>
11-
<ItemGroup>
12-
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
13-
</ItemGroup>
14-
<ItemGroup>
15-
<DotNetCliToolReference Include="ElectronNET.CLI" Version="*" />
7+
<PackageReference Include="ElectronNET.API" Version="0.0.11" />
8+
<PackageReference Include="Microsoft.AspNetCore.App" />
9+
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="2.2.0" />
10+
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.1" />
1611
</ItemGroup>
1712
<ItemGroup>
1813
<None Update="Assets\electron.ico">

ElectronNET-API-Demos/Program.cs

+3-4
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@ public class Program
88
{
99
public static void Main(string[] args)
1010
{
11-
BuildWebHost(args).Run();
11+
CreateWebHostBuilder(args).Build().Run();
1212
}
1313

14-
public static IWebHost BuildWebHost(string[] args) =>
14+
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
1515
WebHost.CreateDefaultBuilder(args)
1616
.UseStartup<Startup>()
17-
.UseElectron(args)
18-
.Build();
17+
.UseElectron(args);
1918
}
2019
}

0 commit comments

Comments
 (0)