Skip to content

Commit

Permalink
Update packages and target framework to 3.1 (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
glucaci committed Jul 2, 2020
1 parent 763b8af commit f7dfa78
Show file tree
Hide file tree
Showing 37 changed files with 193 additions and 239 deletions.
4 changes: 2 additions & 2 deletions global.json
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "3.1.102"
"version": "3.1.301"
}
}
}
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
Expand All @@ -19,6 +19,7 @@
</ItemGroup>

<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.8" />
</ItemGroup>

Expand Down
16 changes: 8 additions & 8 deletions src/Clients/AspNetCore.Tests/AspNetCore.Tests.csproj
@@ -1,24 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AssemblyName>Thor.Hosting.AspNetCore.Tests</AssemblyName>
<RootNamespace>Thor.Hosting.AspNetCore.Tests</RootNamespace>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="3.0.0" />
<PackageReference Include="coverlet.msbuild" Version="2.5.0">
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="3.1.5" />
<PackageReference Include="coverlet.msbuild" Version="2.9.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeCoverage" Version="16.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
<PackageReference Include="Moq" Version="4.10.1" />
<PackageReference Include="Microsoft.CodeCoverage" Version="16.6.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.5" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="Moq" Version="4.14.5" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
@@ -1,7 +1,8 @@
using System.Collections.Generic;
using System.Collections.Generic;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Moq;
using Xunit;

Expand All @@ -18,7 +19,7 @@ public void AddTracing()
// arrange
IServiceCollection services = new ServiceCollection();
IConfigurationBuilder builder = new ConfigurationBuilder();
Mock<IApplicationLifetime> appLifetime = new Mock<IApplicationLifetime>();
Mock<IHostApplicationLifetime> appLifetime = new Mock<IHostApplicationLifetime>();
Dictionary<string, string> data = new Dictionary<string, string>
{
{"Tracing:ApplicationId", "5"},
Expand All @@ -43,4 +44,4 @@ public void AddTracing()

#endregion
}
}
}
17 changes: 5 additions & 12 deletions src/Clients/AspNetCore/AspNetCore.csproj
@@ -1,26 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netcoreapp3.0</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<PackageId>Thor.AspNetCore</PackageId>
<AssemblyName>Thor.Hosting.AspNetCore</AssemblyName>
<RootNamespace>Thor.Hosting.AspNetCore</RootNamespace>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Description>Provides tracing capabilities for AspNet core 2.0 and higher.</Description>
<Description>Provides tracing capabilities for ASP.NET Core.</Description>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)'!='netcoreapp3.0'">
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Http.Extensions" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Options" Version="2.1.1" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp3.0'">
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.Extensions.Options" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="3.1.0" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion src/Clients/AspNetCore/TracingStartupFilter.cs
Expand Up @@ -3,6 +3,7 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Thor.Core;
using Thor.Core.Session.Abstractions;
using Thor.Core.Transmission.Abstractions;
Expand All @@ -27,7 +28,7 @@ public class TracingStartupFilter
/// <param name="initializer">An attachment transmission initializer.</param>
/// <param name="session">An optional telemetry event session.</param>
public TracingStartupFilter(
IApplicationLifetime applicationLifetime,
IHostApplicationLifetime applicationLifetime,
TracingConfiguration options,
IAttachmentTransmissionInitializer initializer,
ITelemetrySession session)
Expand Down
10 changes: 5 additions & 5 deletions src/Clients/GenericHost.Sample/GenericHost.Sample.csproj
@@ -1,17 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AssemblyName>Thor.Hosting.GenericHost.FunctionalTest</AssemblyName>
<RootNamespace>Thor.Hosting.GenericHost.FunctionalTest</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.1.5" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.5" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\GenericHost\GenericHost.csproj" />
<ProjectReference Include="..\Hosting\Hosting.csproj" />
Expand Down
18 changes: 9 additions & 9 deletions src/Clients/GenericHost.Tests/GenericHost.Tests.csproj
@@ -1,22 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AssemblyName>Thor.Hosting.GenericHost.Tests</AssemblyName>
<RootNamespace>Thor.Hosting.GenericHost.Tests</RootNamespace>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coveralls.io" Version="1.4.2" />
<PackageReference Include="Microsoft.CodeCoverage" Version="16.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
<PackageReference Include="Moq" Version="4.10.1" />
<PackageReference Include="OpenCover" Version="4.6.519" />
<PackageReference Include="Microsoft.CodeCoverage" Version="16.6.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.5" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.1.5" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="Moq" Version="4.14.5" />
<PackageReference Include="OpenCover" Version="4.7.922" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
16 changes: 5 additions & 11 deletions src/Clients/GenericHost/GenericHost.csproj
@@ -1,24 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netcoreapp3.0</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<PackageId>Thor.GenericHost</PackageId>
<AssemblyName>Thor.Hosting.GenericHost</AssemblyName>
<RootNamespace>Thor.Hosting.GenericHost</RootNamespace>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Description>Provides tracing capabilities for GenericHost core 2.0 and higher.</Description>
<Description>Provides tracing capabilities for GenericHost.</Description>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)'!='netcoreapp3.0'">
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Options" Version="2.1.1" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp3.0'">
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="3.0.0" />
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="3.1.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Clients/GenericHost/HostBuilderExtensions.cs
Expand Up @@ -19,7 +19,7 @@ public static class HostBuilderExtensions
builder.AddTracing(context.Configuration))
.Build();

var hostTelemetryInitializer = host.Services
HostTelemetryInitializer hostTelemetryInitializer = host.Services
.GetService<HostTelemetryInitializer>();

hostTelemetryInitializer?.Initialize();
Expand Down
4 changes: 2 additions & 2 deletions src/Clients/GenericHost/HostTelemetryInitializer.cs
Expand Up @@ -8,13 +8,13 @@ namespace Thor.Hosting.GenericHost
{
internal class HostTelemetryInitializer
{
private readonly IApplicationLifetime _applicationLifetime;
private readonly IHostApplicationLifetime _applicationLifetime;
private readonly ITelemetrySession _session;
private readonly IAttachmentTransmissionInitializer _initializer;
private readonly TracingConfiguration _options;

public HostTelemetryInitializer(
IApplicationLifetime applicationLifetime,
IHostApplicationLifetime applicationLifetime,
ITelemetrySession session,
IAttachmentTransmissionInitializer initializer,
TracingConfiguration options)
Expand Down
20 changes: 10 additions & 10 deletions src/Clients/Hosting.Tests/Hosting.Tests.csproj
@@ -1,27 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AssemblyName>Thor.Extensions.Hosting.Tests</AssemblyName>
<RootNamespace>Thor.Extensions.Hosting.Tests</RootNamespace>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="coverlet.msbuild" Version="2.5.0">
<PackageReference Include="coverlet.msbuild" Version="2.9.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="HotChocolate.AspNetCore" Version="9.0.4" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.0.0" />
<PackageReference Include="Microsoft.CodeCoverage" Version="16.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="2.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
<PackageReference Include="Moq" Version="4.10.1" />
<PackageReference Include="HotChocolate.AspNetCore" Version="11.0.0-preview.129" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.5" />
<PackageReference Include="Microsoft.CodeCoverage" Version="16.6.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.1.5" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="Moq" Version="4.14.5" />
<PackageReference Include="Thor.Analyzer" Version="1.0.4" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
10 changes: 3 additions & 7 deletions src/Clients/Hosting/Hosting.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netcoreapp3.0</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<PackageId>Thor.Extensions.Hosting</PackageId>
<AssemblyName>Thor.Extensions.Hosting</AssemblyName>
<RootNamespace>Thor.Extensions.Hosting</RootNamespace>
Expand All @@ -11,12 +11,8 @@
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)'!='netcoreapp3.0'">
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="2.1.1" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp3.0'">
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="3.0.0" />
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="3.1.0" />
</ItemGroup>

<ItemGroup>
Expand Down
18 changes: 9 additions & 9 deletions src/Clients/HotChocolate.Tests/HotChocolate.Tests.csproj
@@ -1,26 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AssemblyName>Thor.Extensions.HotChocolate.Tests</AssemblyName>
<RootNamespace>Thor.Extensions.HotChocolate.Tests</RootNamespace>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="3.0.0" />
<PackageReference Include="coverlet.msbuild" Version="2.5.0">
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="3.1.5" />
<PackageReference Include="coverlet.msbuild" Version="2.9.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="HotChocolate.AspNetCore" Version="11.0.0-preview.129" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.0" />
<PackageReference Include="Microsoft.CodeCoverage" Version="16.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
<PackageReference Include="Moq" Version="4.10.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.5" />
<PackageReference Include="Microsoft.CodeCoverage" Version="16.6.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="Moq" Version="4.14.5" />
<PackageReference Include="Thor.Analyzer" Version="1.0.4" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
11 changes: 2 additions & 9 deletions src/Clients/HotChocolate/HotChocolate.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netcoreapp3.0</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<PackageId>Thor.HotChocolate</PackageId>
<AssemblyName>Thor.Extensions.HotChocolate</AssemblyName>
<RootNamespace>Thor.Extensions.HotChocolate</RootNamespace>
Expand All @@ -12,15 +12,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="HotChocolate" Version="11.0.0-preview.129" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'!='netcoreapp3.0'">
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.1.1" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp3.0'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="HotChocolate" Version="11.0.0-preview.129" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 6 additions & 2 deletions src/Clients/Http.FunctionalTest/Http.FunctionalTest.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AssemblyName>Thor.Extensions.Http.FunctionalTest</AssemblyName>
<RootNamespace>Thor.Extensions.Http.FunctionalTest</RootNamespace>
</PropertyGroup>
Expand All @@ -14,6 +14,10 @@
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.4" />
</ItemGroup>

<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Http\Http.csproj" />
</ItemGroup>
Expand Down

0 comments on commit f7dfa78

Please sign in to comment.