Skip to content

Commit 745a0a8

Browse files
committed
update to most recent electron.net version (.NET Core 3.0)
1 parent 4428921 commit 745a0a8

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project Sdk="Microsoft.NET.Sdk.Web">
33
<PropertyGroup>
4-
<TargetFramework>netcoreapp2.2</TargetFramework>
4+
<TargetFramework>netcoreapp3.0</TargetFramework>
55
</PropertyGroup>
66
<ItemGroup>
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" />
7+
<PackageReference Include="ElectronNET.API" Version="5.30.1" />
118
</ItemGroup>
129
<ItemGroup>
1310
<None Update="Assets\electron.ico">

ElectronNET-API-Demos/Startup.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using Microsoft.Extensions.DependencyInjection;
55
using ElectronNET.API;
66
using ElectronNET.API.Entities;
7+
using Microsoft.Extensions.Hosting;
78

89
namespace ElectronNET_API_Demos
910
{
@@ -23,12 +24,11 @@ public void ConfigureServices(IServiceCollection services)
2324
}
2425

2526
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
26-
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
27+
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
2728
{
2829
if (env.IsDevelopment())
2930
{
3031
app.UseDeveloperExceptionPage();
31-
app.UseBrowserLink();
3232
}
3333
else
3434
{
@@ -37,11 +37,11 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env)
3737

3838
app.UseStaticFiles();
3939

40-
app.UseMvc(routes =>
40+
app.UseRouting();
41+
42+
app.UseEndpoints(endpoints =>
4143
{
42-
routes.MapRoute(
43-
name: "default",
44-
template: "{controller=Home}/{action=Index}/{id?}");
44+
endpoints.MapControllerRoute("default", "{controller=Home}/{action=Index}/{id?}");
4545
});
4646

4747
if (HybridSupport.IsElectronActive)

0 commit comments

Comments
 (0)