Upgrade dashboard demo to asp.net core 3.0

pull/1810/head
Halil İbrahim Kalkan 5 years ago
parent 603f029192
commit 8dcee0e05a

@ -3,7 +3,7 @@
<Import Project="..\..\common.props" /> <Import Project="..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework> <TargetFramework>netcoreapp3.0</TargetFramework>
<RootNamespace>DashboardDemo</RootNamespace> <RootNamespace>DashboardDemo</RootNamespace>
</PropertyGroup> </PropertyGroup>

@ -4,14 +4,11 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework> <TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<None Remove="appsettings.json" /> <None Remove="appsettings.json" />
</ItemGroup>
<ItemGroup>
<Content Include="appsettings.json"> <Content Include="appsettings.json">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory> <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
@ -19,7 +16,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.2.4" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.0.0-preview9.19423.6" />
<PackageReference Include="Serilog.Extensions.Logging" Version="2.0.4" /> <PackageReference Include="Serilog.Extensions.Logging" Version="2.0.4" />
<PackageReference Include="Serilog.Sinks.File" Version="4.0.0" /> <PackageReference Include="Serilog.Sinks.File" Version="4.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" /> <PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />

@ -3,7 +3,7 @@
<Import Project="..\..\common.props" /> <Import Project="..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework> <TargetFramework>netcoreapp3.0</TargetFramework>
<RootNamespace>DashboardDemo</RootNamespace> <RootNamespace>DashboardDemo</RootNamespace>
</PropertyGroup> </PropertyGroup>

@ -3,7 +3,7 @@
<Import Project="..\..\common.props" /> <Import Project="..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework> <TargetFramework>netcoreapp3.0</TargetFramework>
<RootNamespace>DashboardDemo</RootNamespace> <RootNamespace>DashboardDemo</RootNamespace>
</PropertyGroup> </PropertyGroup>
@ -12,7 +12,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.2.6" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.0.0-preview9.19423.6" />
</ItemGroup> </ItemGroup>
</Project> </Project>

@ -3,7 +3,7 @@
<Import Project="..\..\common.props" /> <Import Project="..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework> <TargetFramework>netcoreapp3.0</TargetFramework>
<RootNamespace>DashboardDemo</RootNamespace> <RootNamespace>DashboardDemo</RootNamespace>
</PropertyGroup> </PropertyGroup>

@ -3,7 +3,7 @@
<Import Project="..\..\common.props" /> <Import Project="..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>netcoreapp3.0</TargetFramework>
<RootNamespace>DashboardDemo</RootNamespace> <RootNamespace>DashboardDemo</RootNamespace>
</PropertyGroup> </PropertyGroup>

@ -3,7 +3,7 @@
<Import Project="..\..\common.props" /> <Import Project="..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework> <TargetFramework>netcoreapp3.0</TargetFramework>
<RootNamespace>DashboardDemo</RootNamespace> <RootNamespace>DashboardDemo</RootNamespace>
</PropertyGroup> </PropertyGroup>

@ -3,7 +3,7 @@
<Import Project="..\..\common.props" /> <Import Project="..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework> <TargetFramework>netcoreapp3.0</TargetFramework>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel> <AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
<RootNamespace>DashboardDemo.Web</RootNamespace> <RootNamespace>DashboardDemo.Web</RootNamespace>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
@ -12,6 +12,7 @@
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<PreserveCompilationContext>true</PreserveCompilationContext> <PreserveCompilationContext>true</PreserveCompilationContext>
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish> <MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
<PreserveCompilationReferences>true</PreserveCompilationReferences>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -31,12 +32,10 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
<PackageReference Include="Serilog.AspNetCore" Version="2.1.1" /> <PackageReference Include="Serilog.AspNetCore" Version="2.1.1" />
<PackageReference Include="Serilog.Sinks.File" Version="4.0.0" /> <PackageReference Include="Serilog.Sinks.File" Version="4.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="4.0.1" /> <PackageReference Include="Swashbuckle.AspNetCore" Version="4.0.1" />
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="2.7.0" /> <PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

@ -4,6 +4,7 @@ using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using DashboardDemo.EntityFrameworkCore; using DashboardDemo.EntityFrameworkCore;
using DashboardDemo.Localization; using DashboardDemo.Localization;
using DashboardDemo.MultiTenancy; using DashboardDemo.MultiTenancy;
@ -109,7 +110,7 @@ namespace DashboardDemo.Web
}); });
} }
private void ConfigureVirtualFileSystem(IHostingEnvironment hostingEnvironment) private void ConfigureVirtualFileSystem(IWebHostEnvironment hostingEnvironment)
{ {
if (hostingEnvironment.IsDevelopment()) if (hostingEnvironment.IsDevelopment())
{ {
@ -186,6 +187,7 @@ namespace DashboardDemo.Web
} }
app.UseVirtualFiles(); app.UseVirtualFiles();
app.UseRouting();
app.UseAuthentication(); app.UseAuthentication();
app.UseJwtTokenMiddleware(); app.UseJwtTokenMiddleware();
@ -196,11 +198,12 @@ namespace DashboardDemo.Web
app.UseIdentityServer(); app.UseIdentityServer();
app.UseAbpRequestLocalization(); app.UseAbpRequestLocalization();
app.UseSwagger(); //Swagger does not support ASP.NET Core 3.0 yet
app.UseSwaggerUI(options => //app.UseSwagger();
{ //app.UseSwaggerUI(options =>
options.SwaggerEndpoint("/swagger/v1/swagger.json", "DashboardDemo API"); //{
}); // options.SwaggerEndpoint("/swagger/v1/swagger.json", "DashboardDemo API");
//});
app.UseAuditing(); app.UseAuditing();
app.UseMvcWithDefaultRouteAndArea(); app.UseMvcWithDefaultRouteAndArea();
} }

@ -3,7 +3,7 @@
<Import Project="..\..\common.props" /> <Import Project="..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework> <TargetFramework>netcoreapp3.0</TargetFramework>
<RootNamespace>DashboardDemo</RootNamespace> <RootNamespace>DashboardDemo</RootNamespace>
</PropertyGroup> </PropertyGroup>
@ -13,7 +13,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

@ -3,7 +3,7 @@
<Import Project="..\..\common.props" /> <Import Project="..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework> <TargetFramework>netcoreapp3.0</TargetFramework>
<RootNamespace>DashboardDemo</RootNamespace> <RootNamespace>DashboardDemo</RootNamespace>
</PropertyGroup> </PropertyGroup>
@ -12,7 +12,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

@ -3,7 +3,7 @@
<Import Project="..\..\common.props" /> <Import Project="..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework> <TargetFramework>netcoreapp3.0</TargetFramework>
<RootNamespace>DashboardDemo</RootNamespace> <RootNamespace>DashboardDemo</RootNamespace>
</PropertyGroup> </PropertyGroup>
@ -13,9 +13,9 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="2.2.4" /> <PackageReference Include="Microsoft.Data.Sqlite" Version="3.0.0-preview9.19423.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.4" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.0.0-preview9.19423.6" />
</ItemGroup> </ItemGroup>
</Project> </Project>

@ -2,14 +2,11 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework> <TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<None Remove="appsettings.json" /> <None Remove="appsettings.json" />
</ItemGroup>
<ItemGroup>
<Content Include="appsettings.json"> <Content Include="appsettings.json">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory> <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>

@ -3,7 +3,7 @@
<Import Project="..\..\common.props" /> <Import Project="..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework> <TargetFramework>netcoreapp3.0</TargetFramework>
<RootNamespace>DashboardDemo</RootNamespace> <RootNamespace>DashboardDemo</RootNamespace>
</PropertyGroup> </PropertyGroup>
@ -15,7 +15,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="NSubstitute" Version="4.2.0" /> <PackageReference Include="NSubstitute" Version="4.2.0" />
<PackageReference Include="Shouldly" Version="3.0.2" /> <PackageReference Include="Shouldly" Version="3.0.2" />
<PackageReference Include="xunit" Version="2.4.1" /> <PackageReference Include="xunit" Version="2.4.1" />

@ -3,7 +3,7 @@
<Import Project="..\..\common.props" /> <Import Project="..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework> <TargetFramework>netcoreapp3.0</TargetFramework>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
<RootNamespace>DashboardDemo</RootNamespace> <RootNamespace>DashboardDemo</RootNamespace>
@ -14,7 +14,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<ProjectReference Include="..\DashboardDemo.Application.Tests\DashboardDemo.Application.Tests.csproj" /> <ProjectReference Include="..\DashboardDemo.Application.Tests\DashboardDemo.Application.Tests.csproj" />
<ProjectReference Include="..\..\src\DashboardDemo.Web\DashboardDemo.Web.csproj" /> <ProjectReference Include="..\..\src\DashboardDemo.Web\DashboardDemo.Web.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.AspNetCore.TestBase\Volo.Abp.AspNetCore.TestBase.csproj" /> <ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.AspNetCore.TestBase\Volo.Abp.AspNetCore.TestBase.csproj" />

Loading…
Cancel
Save