Skip to content

Commit

Permalink
Upgrade app to 2.1 (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
scottaddie authored and CamSoper committed Jun 19, 2018
1 parent 15289d0 commit 9226dcd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
7 changes: 3 additions & 4 deletions SimpleFeedReader/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ public class Program
{
public static void Main(string[] args)
{
BuildWebHost(args).Run();
CreateWebHostBuilder(args).Build().Run();
}

public static IWebHost BuildWebHost(string[] args) =>
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>()
.Build();
.UseStartup<Startup>();
}
}
10 changes: 3 additions & 7 deletions SimpleFeedReader/SimpleFeedReader.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.6" />
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.0" />
<PackageReference Include="Microsoft.SyndicationFeed.ReaderWriter" Version="1.0.2" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.0.3" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.3" />
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions SimpleFeedReader/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using SimpleFeedReader.Repositories;
Expand All @@ -19,15 +20,14 @@ public Startup(IConfiguration configuration)
public void ConfigureServices(IServiceCollection services)
{
services.AddScoped<NewsItemRepository>();
services.AddMvc();
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
}

// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseBrowserLink();
app.UseDeveloperExceptionPage();
}
else
Expand Down

0 comments on commit 9226dcd

Please sign in to comment.