Browse Source
Merge pull request #4 from ElectronNET/update-to-netcore3
Update to .NET Core 3
master
Robert Muehsig
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
8 additions and
13 deletions
-
MyElectronMusicPlayer/MyElectronMusicPlayer.csproj
-
MyElectronMusicPlayer/Startup.cs
|
|
@ -1,19 +1,13 @@ |
|
|
|
<?xml version="1.0" encoding="utf-8"?> |
|
|
|
<Project Sdk="Microsoft.NET.Sdk.Web"> |
|
|
|
<PropertyGroup> |
|
|
|
<TargetFramework>netcoreapp2.0</TargetFramework> |
|
|
|
<TargetFramework>netcoreapp3.0</TargetFramework> |
|
|
|
</PropertyGroup> |
|
|
|
<ItemGroup> |
|
|
|
<Folder Include="wwwroot\" /> |
|
|
|
</ItemGroup> |
|
|
|
<ItemGroup> |
|
|
|
<PackageReference Include="ElectronNET.API" Version="0.0.5" /> |
|
|
|
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" /> |
|
|
|
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.0.0" /> |
|
|
|
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.0.0" /> |
|
|
|
</ItemGroup> |
|
|
|
<ItemGroup> |
|
|
|
<DotNetCliToolReference Include="ElectronNET.CLI" Version="*" /> |
|
|
|
<PackageReference Include="ElectronNET.API" Version="5.30.1" /> |
|
|
|
</ItemGroup> |
|
|
|
<ItemGroup> |
|
|
|
<Content Update="electron.manifest.json"> |
|
|
|
|
|
@ -3,6 +3,7 @@ using Microsoft.AspNetCore.Hosting; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using ElectronNET.API; |
|
|
|
using ElectronNET.API.Entities; |
|
|
|
using Microsoft.Extensions.Hosting; |
|
|
|
|
|
|
|
namespace MyElectronMusicPlayer |
|
|
|
{ |
|
|
@ -16,18 +17,18 @@ namespace MyElectronMusicPlayer |
|
|
|
} |
|
|
|
|
|
|
|
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
|
|
|
public void Configure(IApplicationBuilder app, IHostingEnvironment env) |
|
|
|
public void Configure(IApplicationBuilder app, IWebHostEnvironment env) |
|
|
|
{ |
|
|
|
if (env.IsDevelopment()) |
|
|
|
{ |
|
|
|
app.UseDeveloperExceptionPage(); |
|
|
|
} |
|
|
|
|
|
|
|
app.UseMvc(routes => |
|
|
|
app.UseRouting(); |
|
|
|
|
|
|
|
app.UseEndpoints(endpoints => |
|
|
|
{ |
|
|
|
routes.MapRoute( |
|
|
|
name: "default", |
|
|
|
template: "{controller=Home}/{action=Index}/{id?}"); |
|
|
|
endpoints.MapControllerRoute("default", "{controller=Home}/{action=Index}/{id?}"); |
|
|
|
}); |
|
|
|
|
|
|
|
Bootstrap(); |
|
|
|