Skip to content

Commit 494a964

Browse files
author
Steve Salas
committed
Squashed 'dotnet-symbol-service/' changes from 08a42b937..bffd9aae3
bffd9aae3 Project depends on .NET Core 2 git-subtree-dir: dotnet-symbol-service git-subtree-split: bffd9aae3f1dc6430f5e7551aa07e57783f32044
1 parent 4bcc3af commit 494a964

File tree

3 files changed

+12
-22
lines changed

3 files changed

+12
-22
lines changed

SymbolService/Program.cs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// See the License for the specific language governing permissions and
1515
// limitations under the License.
1616

17-
using System.IO;
17+
using Microsoft.AspNetCore;
1818
using Microsoft.AspNetCore.Hosting;
1919

2020
namespace SymbolService
@@ -23,14 +23,12 @@ public class Program
2323
{
2424
public static void Main(string[] args)
2525
{
26-
var host = new WebHostBuilder()
27-
.UseKestrel()
28-
.UseContentRoot(Directory.GetCurrentDirectory())
29-
.UseIISIntegration()
26+
BuildWebHost(args).Run();
27+
}
28+
29+
public static IWebHost BuildWebHost(string[] args) =>
30+
WebHost.CreateDefaultBuilder(args)
3031
.UseStartup<Startup>()
3132
.Build();
32-
33-
host.Run();
34-
}
3533
}
3634
}

SymbolService/Startup.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,16 @@ namespace SymbolService
2424
{
2525
public class Startup
2626
{
27-
public Startup(IHostingEnvironment env)
27+
public Startup(IConfiguration configuration)
2828
{
29-
var builder = new ConfigurationBuilder()
30-
.SetBasePath(env.ContentRootPath)
31-
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
32-
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
33-
.AddEnvironmentVariables();
34-
Configuration = builder.Build();
29+
Configuration = configuration;
3530
}
3631

37-
public IConfigurationRoot Configuration { get; }
32+
public IConfiguration Configuration { get; }
3833

3934
// This method gets called by the runtime. Use this method to add services to the container.
4035
public void ConfigureServices(IServiceCollection services)
4136
{
42-
// Add framework services.
4337
services.AddMvc();
4438
}
4539

SymbolService/SymbolService.csproj

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp1.1</TargetFramework>
4+
<TargetFramework>netcoreapp2.0</TargetFramework>
5+
<AssemblyName>SymbolService</AssemblyName>
56
</PropertyGroup>
67

78
<ItemGroup>
89
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="1.0.2" />
910
</ItemGroup>
1011

1112
<ItemGroup>
12-
<PackageReference Include="Microsoft.AspNetCore" Version="1.1.5" />
13-
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.6" />
14-
<PackageReference Include="Microsoft.Extensions.Logging" Version="1.1.2" />
15-
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.2" />
13+
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.5" />
1614
<PackageReference Include="Mono.Cecil" Version="0.10.0-beta7" />
1715
</ItemGroup>
1816

0 commit comments

Comments
 (0)