Skip to content

Commit

Permalink
.NET 8 Upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisb92 committed Nov 24, 2023
1 parent f64af79 commit d3525d2
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 6 deletions.
1 change: 1 addition & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ build_script:
- ps: .\dotnet-install.ps1 -Runtime dotnet -Version 3.1.10
- ps: .\dotnet-install.ps1 -Version 6.0.100
- ps: .\dotnet-install.ps1 -Version 7.0.100
- ps: .\dotnet-install.ps1 -Version 8.0.100
- ps: .\build.ps1

test: off
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ _**IMPORTANT:** OpenTracing and OpenCensus have merget to form **[OpenTelemetry]

## Supported .NET versions

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

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp3.1;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net6.0;net7.0;net8.0</TargetFrameworks>
</PropertyGroup>

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

<ItemGroup Condition="$(TargetFramework)=='net8.0'">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="[8.0.0,9)" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\OpenTracing.Contrib.NetCore\OpenTracing.Contrib.NetCore.csproj" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "7.0.100",
"version": "8.0.100",
"rollForward": "feature"
}
}
2 changes: 1 addition & 1 deletion launch-sample.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[CmdletBinding(PositionalBinding = $false)]
param(
[ValidateSet("net7.0", "net6.0", "netcoreapp3.1")]
[ValidateSet("net8.0", "net7.0", "net6.0", "netcoreapp3.1")]
[string] $Framework = "net6.0"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

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


<ItemGroup Condition="$(TargetFramework)=='net8.0'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework)=='net8.0'">
<!-- Main dependencies -->
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="[8.0.0,9)" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="[8.0.0,9)" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="[8.0.0,9)" />
<PackageReference Include="Microsoft.Extensions.Options" Version="[8.0.0,9)" />
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="8.0.0" />
<!-- Instrumented libraries (which are not visible as actual dependencies) -->
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.0.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="[8.0.0,9)" PrivateAssets="All" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="[8.0.0,9)" PrivateAssets="All" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.5" PrivateAssets="All" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net6.0;net7.0;net8.0</TargetFrameworks>
</PropertyGroup>

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


<ItemGroup Condition="$(TargetFramework)=='net8.0'">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="[8.0.0,9)" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\OpenTracing.Contrib.NetCore\OpenTracing.Contrib.NetCore.csproj" />
</ItemGroup>
Expand Down

0 comments on commit d3525d2

Please sign in to comment.