Skip to content

Commit

Permalink
Updating to 2.1RC1
Browse files Browse the repository at this point in the history
  • Loading branch information
ardalis committed May 19, 2018
1 parent 4e7f3d7 commit 8060406
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 34 deletions.
5 changes: 0 additions & 5 deletions src/Infrastructure/Infrastructure.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
<ItemGroup>
<ProjectReference Include="..\ApplicationCore\ApplicationCore.csproj" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.0.2" />
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.2" />
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.0.0" />
</ItemGroup>
<ItemGroup>
<Folder Include="Data\Migrations\" />
</ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions src/Web/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ public class Program
{
public static void Main(string[] args)
{
var host = BuildWebHost(args);
var host = CreateWebHostBuilder(args)
.Build();

using (var scope = host.Services.CreateScope())
{
Expand All @@ -38,10 +39,9 @@ public static void Main(string[] args)
host.Run();
}

public static IWebHost BuildWebHost(string[] args) =>
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseUrls("http://0.0.0.0:5106")
.UseStartup<Startup>()
.Build();
.UseStartup<Startup>();
}
}
8 changes: 4 additions & 4 deletions src/Web/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:5106/",
"sslPort": 0
"sslPort": 44316
}
},
"profiles": {
Expand All @@ -16,12 +16,12 @@
}
},
"eShopWeb": {
"commandName": "Project",
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:5106"
}
}
}
}
5 changes: 4 additions & 1 deletion src/Web/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ public void ConfigureServices(IServiceCollection services)
// Add memory cache services
services.AddMemoryCache();

services.AddMvc();
services.AddMvc()
.SetCompatibilityVersion(AspNetCore.Mvc.CompatibilityVersion.Version_2_1);

_services = services;
}
Expand All @@ -125,8 +126,10 @@ public void Configure(IApplicationBuilder app,
else
{
app.UseExceptionHandler("/Catalog/Error");
app.UseHsts();
}

app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseAuthentication();

Expand Down
8 changes: 1 addition & 7 deletions src/Web/Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<ItemGroup>
<PackageReference Include="Dapper" Version="1.50.5" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.1.0-rc1-final" />
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.0-rc1-final" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.1.0-rc1-final" PrivateAssets="All" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.0-rc1-final" PrivateAssets="All" />
</ItemGroup>
Expand All @@ -18,12 +18,6 @@
<ProjectReference Include="..\ApplicationCore\ApplicationCore.csproj" />
<ProjectReference Include="..\Infrastructure\Infrastructure.csproj" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.0.0" />
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.0" />
<DotNetCliToolReference Include="Microsoft.Extensions.SecretManager.Tools" Version="2.0.0" />
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
</ItemGroup>
<ItemGroup>
<None Include="wwwroot\images\products\1.png" />
<None Include="wwwroot\images\products\10.png" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@page
@model LoginWithRecoveryCodeModel
@model LoginWithRecoveryCodeModel
@{
ViewData["Title"] = "Recovery code verification";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using System.ComponentModel.DataAnnotations;
using System.Threading.Tasks;

namespace Microsoft.eShopWeb.RazorPages.Pages.Account.Manage
namespace Microsoft.eShopWeb.RazorPages.Pages.Account
{
public class LoginWithRecoveryCodeModel : PageModel
{
Expand Down
8 changes: 4 additions & 4 deletions src/WebRazorPages/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ public class Program
{
public static void Main(string[] args)
{
var host = BuildWebHost(args);
var host = CreateWebHostBuilder(args)
.Build();

using (var scope = host.Services.CreateScope())
{
Expand All @@ -38,10 +39,9 @@ public static void Main(string[] args)
host.Run();
}

public static IWebHost BuildWebHost(string[] args) =>
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseUrls("http://0.0.0.0:5106")
.UseStartup<Startup>()
.Build();
.UseStartup<Startup>();
}
}
4 changes: 2 additions & 2 deletions src/WebRazorPages/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:28655/",
"sslPort": 0
"sslPort": 44305
}
},
"profiles": {
Expand All @@ -24,4 +24,4 @@
"applicationUrl": "http://localhost:28656/"
}
}
}
}
3 changes: 3 additions & 0 deletions src/WebRazorPages/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ public void ConfigureServices(IServiceCollection services)
services.AddMemoryCache();

services.AddMvc()
.SetCompatibilityVersion(AspNetCore.Mvc.CompatibilityVersion.Version_2_1)
.AddRazorPagesOptions(options =>
{
options.Conventions.AuthorizeFolder("/Order");
Expand All @@ -130,8 +131,10 @@ public void Configure(IApplicationBuilder app,
else
{
app.UseExceptionHandler("/Catalog/Error");
app.UseHsts();
}

app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseAuthentication();

Expand Down
5 changes: 1 addition & 4 deletions src/WebRazorPages/WebRazorPages.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
<AssemblyName>Microsoft.eShopWeb.RazorPages</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.1.0-rc1-final" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.0-rc1-final" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ApplicationCore\ApplicationCore.csproj" />
Expand Down
1 change: 0 additions & 1 deletion tests/UnitTests/UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.1.0-rc1-final" />

<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0-preview-20180510-03" />
<PackageReference Include="Moq" Version="4.8.2" />
<PackageReference Include="xunit" Version="2.4.0-beta.1.build3958" />
Expand Down

0 comments on commit 8060406

Please sign in to comment.