Removed AspNet 2.2 dependencies from test application

This commit is contained in:
David Barker
2021-03-03 16:54:23 +08:00
parent 91329b8653
commit 4c8bd6a225
3 changed files with 30 additions and 30 deletions
@@ -8,20 +8,15 @@
<ItemGroup>
<PackageReference Include="AspNetCore.Identity.MongoDbCore" Version="2.1.1" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.13.0-beta1" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="3.1.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.1.1" />
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="3.1.1" />
<PackageReference Include="Microsoft.Extensions.Identity.Core" Version="3.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="3.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="3.1.1" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="3.1.0" Condition="'$(Configuration)' == 'Debug'" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.17.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="3.1.12" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.1.12" />
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="3.1.12" />
<PackageReference Include="Microsoft.Extensions.Identity.Core" Version="3.1.12" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="3.1.12" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="3.1.12" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.12" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="3.1.12" Condition="'$(Configuration)' == 'Debug'" />
</ItemGroup>
<ItemGroup>
@@ -35,5 +30,10 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<!-- Select one of the following to build this solution -->
<ItemGroup>
<!-- <PackageReference Include="AspNetCore.Identity.MongoDbCore" Version="3.1.0" /> -->
<ProjectReference Include="..\..\src\AspNetCore.Identity.MongoDbCore.csproj" />
</ItemGroup>
</Project>
+12 -14
View File
@@ -1,15 +1,15 @@
using AspNetCore.Identity.MongoDbCore.Infrastructure;
using System;
using AspNetCore.Identity.MongoDbCore.Infrastructure;
using AspNetCore.Identity.MongoDbCore.Models;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using MongoIdentitySample.Mvc.Models;
using MongoIdentitySample.Mvc.Services;
using Microsoft.Extensions.Logging;
using System;
namespace MongoIdentitySample.Mvc
{
@@ -24,7 +24,7 @@ namespace MongoIdentitySample.Mvc
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
//per user config that is not committed to repo, use this to override settings (e.g. connection string) based on your local environment.
.AddJsonFile($"appsettings.local.json", optional: true);
.AddJsonFile($"appsettings.local.json", optional: true);
builder.AddEnvironmentVariables();
Configuration = builder.Build();
@@ -48,16 +48,15 @@ namespace MongoIdentitySample.Mvc
var builder = services.AddRazorPages();
#if DEBUG
if(_env.IsDevelopment())
{
builder.AddRazorRuntimeCompilation();
}
#endif
#if DEBUG
if (_env.IsDevelopment())
{
builder.AddRazorRuntimeCompilation();
}
#endif
services.AddMvc();
services.AddApplicationInsightsTelemetry();
// Add application services.
@@ -71,7 +70,6 @@ namespace MongoIdentitySample.Mvc
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
app.UseBrowserLink();
}
else
{