Skip to content

Commit 50dfeff

Browse files
Merge pull request #13 from idubnori/upgrade-to-aspnetcore-2.2
Upgraded to .NET Core 2.2 and Electron.NET 0.0.11
2 parents 23279f7 + 74cc7d6 commit 50dfeff

File tree

4 files changed

+13
-18
lines changed

4 files changed

+13
-18
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
}

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ This Demo-App based on the [Electron API Demos](https://github.com/electron/elec
1414
You'll need [Node.js (v.8.x)](https://nodejs.org) and [.NET Core SDK](https://www.microsoft.com/net/download/core) installed on your computer in order to start or build this app.
1515

1616
```bash
17+
$ dotnet tool install --global ElectronNET.CLI
1718
$ git clone https://github.com/ElectronNET/electron.net-api-demos.git
1819
$ cd electron.net-api-demos
1920
$ cd ElectronNET-API-Demos
20-
$ dotnet restore
21-
$ dotnet electronize start
21+
$ electronize start
2222
```
2323

2424
**Enjoy!**

0 commit comments

Comments
 (0)