Skip to content

Commit 9c99fb0

Browse files
committed
.NET 8 Upgrade
1 parent f64af79 commit 9c99fb0

File tree

8 files changed

+36
-6
lines changed

8 files changed

+36
-6
lines changed

.appveyor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ build_script:
1616
- ps: .\dotnet-install.ps1 -Runtime dotnet -Version 3.1.10
1717
- ps: .\dotnet-install.ps1 -Version 6.0.100
1818
- ps: .\dotnet-install.ps1 -Version 7.0.100
19+
- ps: .\dotnet-install.ps1 -Version 8.0.100
1920
- ps: .\build.ps1
2021

2122
test: off

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ _**IMPORTANT:** OpenTracing and OpenCensus have merget to form **[OpenTelemetry]
99

1010
## Supported .NET versions
1111

12-
This project currently only supports apps targeting .NET Core 3.1, .NET 6.0, or .NET 7.0!
12+
This project currently only supports apps targeting .NET Core 3.1, .NET 6.0, .NET 7.0, or .NET 8.0!
1313

1414
This project DOES NOT support the full .NET framework as that uses different instrumentation code.
1515

benchmarks/OpenTracing.Contrib.NetCore.Benchmarks/OpenTracing.Contrib.NetCore.Benchmarks.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>netcoreapp3.1;net6.0;net7.0</TargetFrameworks>
5+
<TargetFrameworks>netcoreapp3.1;net6.0;net7.0;net8.0</TargetFrameworks>
66
</PropertyGroup>
77

88
<ItemGroup>
@@ -22,6 +22,10 @@
2222
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="[7.0.0,8)" />
2323
</ItemGroup>
2424

25+
<ItemGroup Condition="$(TargetFramework)=='net8.0'">
26+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="[8.0.0,9)" />
27+
</ItemGroup>
28+
2529
<ItemGroup>
2630
<ProjectReference Include="..\..\src\OpenTracing.Contrib.NetCore\OpenTracing.Contrib.NetCore.csproj" />
2731
</ItemGroup>

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "7.0.100",
3+
"version": "8.0.100",
44
"rollForward": "feature"
55
}
66
}

launch-sample.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[CmdletBinding(PositionalBinding = $false)]
22
param(
3-
[ValidateSet("net7.0", "net6.0", "netcoreapp3.1")]
3+
[ValidateSet("net8.0", "net7.0", "net6.0", "netcoreapp3.1")]
44
[string] $Framework = "net6.0"
55
)
66

src/OpenTracing.Contrib.NetCore/OpenTracing.Contrib.NetCore.csproj

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netcoreapp3.1;net6.0;net7.0</TargetFrameworks>
4+
<TargetFrameworks>netcoreapp3.1;net6.0;net7.0;net8.0</TargetFrameworks>
55
<Description>Adds OpenTracing instrumentation for .NET Core apps that use the `Microsoft.Extensions.*` stack.
66
Instrumented components: HttpClient calls, ASP.NET Core, Entity Framework Core and any other library that uses DiagnosticSource events.</Description>
77
<PackageTags>opentracing;distributed-tracing;tracing;netcore</PackageTags>
@@ -65,4 +65,23 @@ Instrumented components: HttpClient calls, ASP.NET Core, Entity Framework Core a
6565
<PackageReference Include="System.Data.SqlClient" Version="4.8.5" PrivateAssets="All" />
6666
</ItemGroup>
6767

68+
69+
<ItemGroup Condition="$(TargetFramework)=='net8.0'">
70+
<FrameworkReference Include="Microsoft.AspNetCore.App" />
71+
</ItemGroup>
72+
73+
<ItemGroup Condition="$(TargetFramework)=='net8.0'">
74+
<!-- Main dependencies -->
75+
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="[8.0.0,9)" />
76+
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="[8.0.0,9)" />
77+
<PackageReference Include="Microsoft.Extensions.Logging" Version="[8.0.0,9)" />
78+
<PackageReference Include="Microsoft.Extensions.Options" Version="[8.0.0,9)" />
79+
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="8.0.0" />
80+
<!-- Instrumented libraries (which are not visible as actual dependencies) -->
81+
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.0.1" PrivateAssets="All" />
82+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="[8.0.0,9)" PrivateAssets="All" />
83+
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="[8.0.0,9)" PrivateAssets="All" />
84+
<PackageReference Include="System.Data.SqlClient" Version="4.8.5" PrivateAssets="All" />
85+
</ItemGroup>
86+
6887
</Project>

test/OpenTracing.Contrib.NetCore.Tests/AspNetCore/HostingTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ public async Task Span_has_status_404()
142142
var client = CreateClient();
143143

144144
await client.GetAsync("/not-found");
145+
await Task.Delay(50);
145146

146147
var finishedSpans = _tracer.FinishedSpans();
147148
Assert.Single(finishedSpans);

test/OpenTracing.Contrib.NetCore.Tests/OpenTracing.Contrib.NetCore.Tests.csproj

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netcoreapp3.1;net6.0;net7.0</TargetFrameworks>
4+
<TargetFrameworks>netcoreapp3.1;net6.0;net7.0;net8.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<ItemGroup>
@@ -27,6 +27,11 @@
2727
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="[7.0.0,8)" />
2828
</ItemGroup>
2929

30+
31+
<ItemGroup Condition="$(TargetFramework)=='net8.0'">
32+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="[8.0.0,9)" />
33+
</ItemGroup>
34+
3035
<ItemGroup>
3136
<ProjectReference Include="..\..\src\OpenTracing.Contrib.NetCore\OpenTracing.Contrib.NetCore.csproj" />
3237
</ItemGroup>

0 commit comments

Comments
 (0)