Skip to content
This repository was archived by the owner on Nov 22, 2018. It is now read-only.

Commit ce8d23d

Browse files
committed
Update sample
1 parent dda9376 commit ce8d23d

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

samples/StaticFileSample/Properties/launchSettings.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@
1212
"commandName": "IISExpress",
1313
"launchBrowser": true,
1414
"environmentVariables": {
15-
"Hosting:Environment": "Development"
15+
"ASPNETCORE_ENVIRONMENT": "Development"
1616
}
1717
},
18-
"web": {
19-
"commandName": "web",
18+
"StaticFileSample": {
19+
"commandName": "Project",
20+
"launchBrowser": true,
21+
"launchUrl": "http://localhost:5000/",
2022
"environmentVariables": {
21-
"Hosting:Environment": "Development"
23+
"ASPNETCORE_ENVIRONMENT": "Development"
2224
}
2325
}
2426
}

samples/StaticFileSample/Startup.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.IO;
23
using Microsoft.AspNetCore.Builder;
34
using Microsoft.AspNetCore.Hosting;
45
using Microsoft.Extensions.DependencyInjection;
@@ -29,6 +30,7 @@ public void Configure(IApplicationBuilder app, ILoggerFactory factory, IHostingE
2930
public static void Main(string[] args)
3031
{
3132
var host = new WebHostBuilder()
33+
.UseContentRoot(Directory.GetCurrentDirectory())
3234
.UseKestrel()
3335
.UseIISIntegration()
3436
.UseStartup<Startup>()

0 commit comments

Comments
 (0)