File tree 2 files changed +12
-1
lines changed
templates/projects/emptyweb 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 4
4
using System . Linq ;
5
5
using System . Threading . Tasks ;
6
6
using Microsoft . AspNetCore . Hosting ;
7
+ using Microsoft . Extensions . Configuration ;
7
8
8
9
namespace < %= namespace % >
9
10
{
10
11
public class Program
11
12
{
12
13
public static void Main ( string [ ] args )
13
14
{
15
+ var config = new ConfigurationBuilder ( )
16
+ . AddCommandLine ( args )
17
+ . AddEnvironmentVariables ( prefix : "ASPNETCORE_" )
18
+ . Build ( ) ;
19
+
14
20
var host = new WebHostBuilder ( )
21
+ . UseConfiguration ( config )
15
22
. UseKestrel ( )
16
23
. UseContentRoot ( Directory . GetCurrentDirectory ( ) )
17
24
. UseIISIntegration ( )
Original file line number Diff line number Diff line change 5
5
"type" : " platform"
6
6
},
7
7
"Microsoft.AspNetCore.Server.IISIntegration" : " 1.0.0-rc2-final" ,
8
- "Microsoft.AspNetCore.Server.Kestrel" : " 1.0.0-rc2-final"
8
+ "Microsoft.AspNetCore.Server.Kestrel" : " 1.0.0-rc2-final" ,
9
+ "Microsoft.Extensions.Configuration.EnvironmentVariables" : " 1.0.0-rc2-final" ,
10
+ "Microsoft.Extensions.Configuration.FileExtensions" : " 1.0.0-rc2-final" ,
11
+ "Microsoft.Extensions.Configuration.Json" : " 1.0.0-rc2-final" ,
12
+ "Microsoft.Extensions.Configuration.CommandLine" : " 1.0.0-rc2-final"
9
13
},
10
14
11
15
"tools" : {
You can’t perform that action at this time.
0 commit comments