Updated content root of musicstore.standalone to enable debugging in VS

This commit is contained in:
Kiran Challa 2016-12-20 15:42:43 -08:00
parent 4dd45f75d3
commit ecdc864e4f
1 changed files with 6 additions and 1 deletions

View File

@ -1,4 +1,6 @@
using System;
using System.IO;
using System.Reflection;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Net.Http.Server;
@ -14,10 +16,13 @@ namespace MusicStore.Standalone
.AddEnvironmentVariables(prefix: "ASPNETCORE_")
.Build();
var currentExecutingAssemblyFileInfo = new FileInfo(typeof(Program).GetTypeInfo().Assembly.Location);
var builder = new WebHostBuilder()
.UseConfiguration(config)
.UseIISIntegration()
.UseStartup("MusicStore.Standalone");
.UseStartup("MusicStore.Standalone")
.UseContentRoot(currentExecutingAssemblyFileInfo.Directory.FullName);
if (string.Equals(builder.GetSetting("server"), "Microsoft.AspNetCore.Server.WebListener", System.StringComparison.Ordinal))
{