File tree Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 2
2
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3
3
4
4
using System ;
5
+ using System . IO ;
5
6
using System . Runtime ;
6
7
using System . Threading ;
7
8
using Benchmarks . Configuration ;
@@ -22,9 +23,12 @@ public static void Main(string[] args)
22
23
Console . WriteLine ( "ASP.NET Core Benchmarks" ) ;
23
24
Console . WriteLine ( "-----------------------" ) ;
24
25
26
+ Console . WriteLine ( $ "Current directory: { Directory . GetCurrentDirectory ( ) } ") ;
27
+
25
28
var webHost = new WebHostBuilder ( )
26
29
. UseServer ( "Microsoft.AspNetCore.Server.Kestrel" )
27
30
. UseCaptureStartupErrors ( false )
31
+ . UseApplicationBasePath ( Directory . GetCurrentDirectory ( ) )
28
32
. UseDefaultConfiguration ( args )
29
33
. UseStartup < Startup > ( )
30
34
. ConfigureServices ( services => services
Original file line number Diff line number Diff line change 13
13
using Microsoft . EntityFrameworkCore ;
14
14
using Microsoft . Extensions . Configuration ;
15
15
using Microsoft . Extensions . DependencyInjection ;
16
+ using Microsoft . Extensions . PlatformAbstractions ;
16
17
17
18
namespace Benchmarks
18
19
{
19
20
public class Startup
20
21
{
21
- public Startup ( IHostingEnvironment env , Scenarios scenarios )
22
+ public Startup ( IApplicationEnvironment appEnv , IHostingEnvironment hostingEnv , Scenarios scenarios )
22
23
{
23
24
// Set up configuration sources.
24
25
var builder = new ConfigurationBuilder ( )
25
- . Include ( env . Configuration )
26
+ . SetBasePath ( appEnv . ApplicationBasePath )
27
+ . Include ( hostingEnv . Configuration )
26
28
. AddJsonFile ( "appsettings.json" )
27
- . AddJsonFile ( $ "appsettings.{ env . EnvironmentName } .json", optional : true )
29
+ . AddJsonFile ( $ "appsettings.{ hostingEnv . EnvironmentName } .json", optional : true )
28
30
. AddEnvironmentVariables ( ) ;
29
31
30
32
Configuration = builder . Build ( ) ;
Original file line number Diff line number Diff line change 19
19
"ef" : " Microsoft.EntityFrameworkCore.Commands"
20
20
},
21
21
"frameworks" : {
22
- "net451" : {},
23
22
"dnxcore50" : {
24
23
"imports" : " portable-net451+win8" ,
25
24
"dependencies" : {
26
25
"Microsoft.NETCore.Platforms" : " 1.0.1-*" ,
27
26
"System.Runtime.Serialization.Primitives" : " 4.1.0-*"
28
27
}
29
- }
28
+ },
29
+ "net451" : {}
30
30
},
31
31
"publishExclude" : [
32
32
" node_modules" ,
You can’t perform that action at this time.
0 commit comments