diff --git a/.appveyor.yml b/.appveyor.yml index 97e9c22..8d837ef 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,7 +1,7 @@ # AppVeyor Build number is incremental and not related to actual version number of the product version: '{build}' -image: Visual Studio 2017 Preview +image: Visual Studio 2017 init: - cmd: git config --global core.autocrlf true diff --git a/.travis.yml b/.travis.yml index 547a389..86e882b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ matrix: dist: trusty sudo: required mono: none - dotnet: 2.1.300-preview2-008533 + dotnet: 2.1.401 addons: apt: sources: diff --git a/benchmarks/OpenTracing.Contrib.NetCore.Benchmarks/OpenTracing.Contrib.NetCore.Benchmarks.csproj b/benchmarks/OpenTracing.Contrib.NetCore.Benchmarks/OpenTracing.Contrib.NetCore.Benchmarks.csproj index 81a1746..f9316b2 100644 --- a/benchmarks/OpenTracing.Contrib.NetCore.Benchmarks/OpenTracing.Contrib.NetCore.Benchmarks.csproj +++ b/benchmarks/OpenTracing.Contrib.NetCore.Benchmarks/OpenTracing.Contrib.NetCore.Benchmarks.csproj @@ -6,7 +6,7 @@ - + diff --git a/global.json b/global.json index d65e3d5..079ebc9 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "2.1.300" + "version": "2.1.401" } } diff --git a/launch-sample.ps1 b/launch-sample.ps1 index 0408278..6ec830d 100644 --- a/launch-sample.ps1 +++ b/launch-sample.ps1 @@ -1,25 +1,33 @@ +[CmdletBinding(PositionalBinding = $false)] +param( + [string] $Framework = "netcoreapp2.1" +) + dotnet build if ($LASTEXITCODE -ne 0) { throw "build error" } +Write-Host "Launching samples with framework $Framework" + Start-Process ` -FilePath powershell.exe ` - -ArgumentList @( "dotnet run --no-restore --no-build; Read-Host 'Press enter to exit'" ) ` + -ArgumentList @( "dotnet run -f $Framework --no-build; Read-Host 'Press enter to exit'" ) ` -WorkingDirectory "samples\CustomersApi" Start-Process ` -FilePath powershell.exe ` - -ArgumentList @( "dotnet run --no-restore --no-build; Read-Host 'Press enter to exit'" ) ` + -ArgumentList @( "dotnet run -f $Framework --no-build; Read-Host 'Press enter to exit'" ) ` -WorkingDirectory "samples\OrdersApi" Start-Sleep -Seconds 2 Start-Process ` -FilePath powershell.exe ` - -ArgumentList @( "dotnet run --no-restore --no-build; Read-Host 'Press enter to exit'" ) ` + -ArgumentList @( "dotnet run -f $Framework --no-build; Read-Host 'Press enter to exit'" ) ` -WorkingDirectory "samples\FrontendWeb" -Start-Process ` - -FilePath powershell.exe ` - -ArgumentList @( "dotnet run --no-restore --no-build; Read-Host 'Press enter to exit'" ) ` - -WorkingDirectory "samples\TrafficGenerator" - +if ($Framework -ne "netcoreapp2.0") { + Start-Process ` + -FilePath powershell.exe ` + -ArgumentList @( "dotnet run -f $Framework --no-build; Read-Host 'Press enter to exit'" ) ` + -WorkingDirectory "samples\TrafficGenerator" +} diff --git a/samples/CustomersApi/CustomersApi.csproj b/samples/CustomersApi/CustomersApi.csproj index 09f2bff..d976b0e 100644 --- a/samples/CustomersApi/CustomersApi.csproj +++ b/samples/CustomersApi/CustomersApi.csproj @@ -1,7 +1,7 @@  - netcoreapp2.0 + netcoreapp2.0;netcoreapp2.1 @@ -9,8 +9,12 @@ - - + + + + + + diff --git a/samples/CustomersApi/Program.cs b/samples/CustomersApi/Program.cs index 4b8d248..4762989 100644 --- a/samples/CustomersApi/Program.cs +++ b/samples/CustomersApi/Program.cs @@ -9,10 +9,10 @@ public class Program { public static void Main(string[] args) { - BuildWebHost(args).Run(); + CreateWebHostBuilder(args).Build().Run(); } - public static IWebHost BuildWebHost(string[] args) + public static IWebHostBuilder CreateWebHostBuilder(string[] args) { return WebHost.CreateDefaultBuilder(args) .UseStartup() @@ -24,8 +24,7 @@ public static IWebHost BuildWebHost(string[] args) // Enables OpenTracing instrumentation for ASP.NET Core, CoreFx, EF Core services.AddOpenTracing(); - }) - .Build(); + }); } } } diff --git a/samples/FrontendWeb/FrontendWeb.csproj b/samples/FrontendWeb/FrontendWeb.csproj index 09f2bff..d976b0e 100644 --- a/samples/FrontendWeb/FrontendWeb.csproj +++ b/samples/FrontendWeb/FrontendWeb.csproj @@ -1,7 +1,7 @@  - netcoreapp2.0 + netcoreapp2.0;netcoreapp2.1 @@ -9,8 +9,12 @@ - - + + + + + + diff --git a/samples/FrontendWeb/Program.cs b/samples/FrontendWeb/Program.cs index 39797aa..ec4c52e 100644 --- a/samples/FrontendWeb/Program.cs +++ b/samples/FrontendWeb/Program.cs @@ -9,10 +9,10 @@ public class Program { public static void Main(string[] args) { - BuildWebHost(args).Run(); + CreateWebHostBuilder(args).Build().Run(); } - public static IWebHost BuildWebHost(string[] args) + public static IWebHostBuilder CreateWebHostBuilder(string[] args) { return WebHost.CreateDefaultBuilder(args) .UseStartup() @@ -24,8 +24,7 @@ public static IWebHost BuildWebHost(string[] args) // Enables OpenTracing instrumentation for ASP.NET Core, CoreFx, EF Core services.AddOpenTracing(); - }) - .Build(); + }); } } } diff --git a/samples/OrdersApi/OrdersApi.csproj b/samples/OrdersApi/OrdersApi.csproj index 09f2bff..d976b0e 100644 --- a/samples/OrdersApi/OrdersApi.csproj +++ b/samples/OrdersApi/OrdersApi.csproj @@ -1,7 +1,7 @@  - netcoreapp2.0 + netcoreapp2.0;netcoreapp2.1 @@ -9,8 +9,12 @@ - - + + + + + + diff --git a/samples/OrdersApi/Program.cs b/samples/OrdersApi/Program.cs index 94f8af5..76b07de 100644 --- a/samples/OrdersApi/Program.cs +++ b/samples/OrdersApi/Program.cs @@ -9,10 +9,10 @@ public class Program { public static void Main(string[] args) { - BuildWebHost(args).Run(); + CreateWebHostBuilder(args).Build().Run(); } - public static IWebHost BuildWebHost(string[] args) + public static IWebHostBuilder CreateWebHostBuilder(string[] args) { return WebHost.CreateDefaultBuilder(args) .UseStartup() @@ -24,8 +24,7 @@ public static IWebHost BuildWebHost(string[] args) // Enables OpenTracing instrumentation for ASP.NET Core, CoreFx, EF Core services.AddOpenTracing(); - }) - .Build(); + }); } } } diff --git a/samples/Shared/Shared.csproj b/samples/Shared/Shared.csproj index 2aeb2a6..4feda0e 100644 --- a/samples/Shared/Shared.csproj +++ b/samples/Shared/Shared.csproj @@ -1,7 +1,7 @@  - netcoreapp2.0 + netcoreapp2.0;netcoreapp2.1 @@ -9,7 +9,7 @@ - + diff --git a/samples/TrafficGenerator/TrafficGenerator.csproj b/samples/TrafficGenerator/TrafficGenerator.csproj index 8b38f16..b0cd2c0 100644 --- a/samples/TrafficGenerator/TrafficGenerator.csproj +++ b/samples/TrafficGenerator/TrafficGenerator.csproj @@ -12,11 +12,11 @@ - - - - - + + + + + diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 1131c45..4f37f38 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -12,9 +12,9 @@ - - - + + + diff --git a/test/OpenTracing.Contrib.NetCore.Tests/OpenTracing.Contrib.NetCore.Tests.csproj b/test/OpenTracing.Contrib.NetCore.Tests/OpenTracing.Contrib.NetCore.Tests.csproj index fca8100..2d86c70 100644 --- a/test/OpenTracing.Contrib.NetCore.Tests/OpenTracing.Contrib.NetCore.Tests.csproj +++ b/test/OpenTracing.Contrib.NetCore.Tests/OpenTracing.Contrib.NetCore.Tests.csproj @@ -1,15 +1,22 @@ - netcoreapp2.0 + netcoreapp2.0;netcoreapp2.1 - - + - - + + + + + + + + + +