Skip to content

Commit

Permalink
chore: dependencies upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
NatMarchand committed May 22, 2023
1 parent e52a618 commit 6713db7
Show file tree
Hide file tree
Showing 20 changed files with 95 additions and 68 deletions.
14 changes: 11 additions & 3 deletions NuGet.config
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="xunit myget" value="https://www.myget.org/F/xunit/api/v3/index.json" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<clear/>
<add key="xunit myget" value="https://www.myget.org/F/xunit/api/v3/index.json"/>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3"/>
</packageSources>
<packageSourceMapping>
<!-- key value for <packageSource> should match key values from <packageSources> element -->
<packageSource key="nuget.org">
<package pattern="*"/>
</packageSource>
<packageSource key="xunit myget">
</packageSource>
</packageSourceMapping>
</configuration>
12 changes: 9 additions & 3 deletions StackExchange.Exceptional.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29519.161
# Visual Studio Version 17
VisualStudioVersion = 17.7.33711.374
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "global", "global", "{9D33C076-4A0C-4366-89B8-9A735E6867EA}"
ProjectSection(SolutionItems) = preProject
Expand All @@ -26,9 +26,14 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{8B91532F-A112-4F73-80BD-A95B7359BBC3}"
ProjectSection(SolutionItems) = preProject
src\Directory.Build.props = src\Directory.Build.props
src\Directory.Packages.props = src\Directory.Packages.props
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{001E5AA4-42C8-4AC3-B14A-AF1DFA02E9FB}"
ProjectSection(SolutionItems) = preProject
samples\Directory.Build.props = samples\Directory.Build.props
samples\Directory.Packages.props = samples\Directory.Packages.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StackExchange.Exceptional.Shared", "src\StackExchange.Exceptional.Shared\StackExchange.Exceptional.Shared.csproj", "{D316FA70-8563-4360-A60F-1A43F3FA30E5}"
EndProject
Expand All @@ -46,6 +51,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{7D435EF2-8616-460D-82DB-EF4D74EEC459}"
ProjectSection(SolutionItems) = preProject
tests\Directory.Build.props = tests\Directory.Build.props
tests\Directory.Packages.props = tests\Directory.Packages.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StackExchange.Exceptional.Tests.AspNetCore", "tests\StackExchange.Exceptional.Tests.AspNetCore\StackExchange.Exceptional.Tests.AspNetCore.csproj", "{30BDD61C-A94B-4558-BB58-E9EEC0B8B845}"
Expand All @@ -56,7 +62,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StackExchange.Exceptional.P
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StackExchange.Exceptional.MongoDB", "src\StackExchange.Exceptional.MongoDB\StackExchange.Exceptional.MongoDB.csproj", "{8CFA59A5-5180-4466-A32E-507F3D541163}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.ConsoleNetCore", "samples\Samples.ConsoleNetCore\Samples.ConsoleNetCore.csproj", "{6CE269E1-6DC9-43A4-B6B8-683CE8A19E6A}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Samples.ConsoleNetCore", "samples\Samples.ConsoleNetCore\Samples.ConsoleNetCore.csproj", "{6CE269E1-6DC9-43A4-B6B8-683CE8A19E6A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
3 changes: 0 additions & 3 deletions samples/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
<Project>
<ItemGroup>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0-preview.2" PrivateAssets="All" IncludeAssets="runtime; build; native; contentfiles; analyzers" />
</ItemGroup>
</Project>
5 changes: 5 additions & 0 deletions samples/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>
<ItemGroup>
<GlobalPackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" />
</ItemGroup>
</Project>
7 changes: 1 addition & 6 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,5 @@
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" PrivateAssets="all" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" IncludeAssets="runtime; build; native; contentfiles; analyzers" />
</ItemGroup>

</Project>
22 changes: 22 additions & 0 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Dapper" Version="2.0.123" />
<PackageVersion Include="Microsoft.Data.SqlClient" Version="5.1.1" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="6.0.0" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="6.0.0" />
<PackageVersion Include="MongoDB.Driver" Version="2.19.1" />
<PackageVersion Include="MySqlConnector" Version="2.2.6" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.1" />
<PackageVersion Include="Npgsql" Version="7.0.4" />
</ItemGroup>
<ItemGroup>
<GlobalPackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" />
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.6.132" />
</ItemGroup>
</Project>
18 changes: 4 additions & 14 deletions src/StackExchange.Exceptional.AspNetCore/ExceptionalMiddleware.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Features;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Newtonsoft.Json;
Expand All @@ -23,11 +23,6 @@ public class ExceptionalMiddleware
{
private readonly RequestDelegate _next;
private readonly ILogger _logger;
#if NETSTANDARD2_0 || NET461
private readonly IHostingEnvironment _env;
#else
private readonly IWebHostEnvironment _env;
#endif
private readonly IOptions<ExceptionalSettings> _settings;

/// <summary>
Expand All @@ -40,22 +35,17 @@ public class ExceptionalMiddleware
public ExceptionalMiddleware(
RequestDelegate next,
IOptions<ExceptionalSettings> settings,
#if NETSTANDARD2_0 || NET461
IHostingEnvironment hostingEnvironment,
#else
IWebHostEnvironment hostingEnvironment,
#endif
IHostEnvironment hostingEnvironment,
ILoggerFactory loggerFactory)
{
_next = next;
_env = hostingEnvironment;
_logger = loggerFactory.CreateLogger<ExceptionalMiddleware>();
_settings = settings;

// If an ApplicationName isn't provided, default to IHostingEnvironment.ApplicationName
if (!_settings.Value.Store.ApplicationName.HasValue())
{
_settings.Value.Store.ApplicationName = _env.ApplicationName;
_settings.Value.Store.ApplicationName = hostingEnvironment.ApplicationName;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,12 @@
<RootNamespace>StackExchange.Exceptional</RootNamespace>
<Description>.NET Error handler/logger used internally at Stack Overflow. Primarily for logging all unhandled exceptions to SQL, but also supporting JSON and Memory based logging.</Description>
<PackageTags>SQL JSON Exception Handler Errors Stack Exchange Exceptional</PackageTags>
<TargetFrameworks>net461;netstandard2.0;netcoreapp3.1;net6.0</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net6.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="../StackExchange.Exceptional.Shared/StackExchange.Exceptional.Shared.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1' OR '$(TargetFramework)' == 'net6.0'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net461' OR '$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="2.0.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<AssemblyName>StackExchange.Exceptional.MongoDB</AssemblyName>
<Description>MongoDB storage provider for StackExchange.Exceptional</Description>
<PackageTags>NoSQL MongoDB Exception Handler Errors Stack Exchange Exceptional</PackageTags>
<TargetFrameworks>net461;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\StackExchange.Exceptional.Shared\StackExchange.Exceptional.Shared.csproj" />
<PackageReference Include="MongoDB.Driver" Version="2.9.1" />
<PackageReference Include="MongoDB.Driver" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<AssemblyName>StackExchange.Exceptional.MySQL</AssemblyName>
<Description>MySQL storage provider for StackExchange.Exceptional</Description>
<PackageTags>SQL MySQL Exception Handler Errors Stack Exchange Exceptional</PackageTags>
<TargetFrameworks>net461;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\StackExchange.Exceptional.Shared\StackExchange.Exceptional.Shared.csproj" />
<PackageReference Include="Dapper" Version="1.50.2" />
<PackageReference Include="MySqlConnector" Version="1.2.0" />
<PackageReference Include="Dapper" />
<PackageReference Include="MySqlConnector" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<Description>PostgreSql storage provider for StackExchange.Exceptional</Description>
<Authors>$(Authors);Mihai Bogdan Eugen</Authors>
<PackageTags>SQL PostgreSql Exception Handler Errors Stack Exchange Exceptional</PackageTags>
<TargetFrameworks>net461;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\StackExchange.Exceptional.Shared\StackExchange.Exceptional.Shared.csproj" />
<PackageReference Include="Dapper" Version="1.50.2" />
<PackageReference Include="Npgsql" Version="3.2.5" />
<PackageReference Include="Dapper" />
<PackageReference Include="Npgsql" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using StackExchange.Exceptional.Internal;
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;

namespace StackExchange.Exceptional
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
<PropertyGroup>
<AssemblyName>StackExchange.Exceptional.Shared</AssemblyName>
<Description>You shouldn't reference this - Exceptional's shared library for all frameworks</Description>
<TargetFrameworks>net461;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0</TargetFrameworks>
<RootNamespace>StackExchange.Exceptional</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Dapper" Version="1.50.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="2.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Dapper" />
<PackageReference Include="Microsoft.Data.SqlClient" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" />
<PackageReference Include="Newtonsoft.Json" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<Reference Include="System.Transactions" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Threading.Tasks;
using Dapper;
using Microsoft.Data.SqlClient;
using StackExchange.Exceptional.Internal;

namespace StackExchange.Exceptional.Stores
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<AssemblyName>StackExchange.Exceptional</AssemblyName>
<Description>.NET Error handler/logger used internally at Stack Overflow. Primarily for logging all unhandled exceptions to SQL, but also supporting JSON and Memory based logging.</Description>
<PackageTags>SQL JSON Exception Handler Errors Stack Exchange Exceptional</PackageTags>
<TargetFrameworks>net461</TargetFrameworks>
<TargetFrameworks>net462</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../StackExchange.Exceptional.Shared/StackExchange.Exceptional.Shared.csproj" />
Expand Down
10 changes: 1 addition & 9 deletions tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,10 @@
<PropertyGroup>
<OutputType>Library</OutputType>
<OutputPath>bin\$(Configuration)\</OutputPath>
<xUnitVersion>2.4.1</xUnitVersion>
<LangVersion>Latest</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0-preview.2" PrivateAssets="All" IncludeAssets="runtime; build; native; contentfiles; analyzers" />
<PackageReference Include="xunit" Version="$(xUnitVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(xUnitVersion)" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net46'">
<ItemGroup Condition="'$(TargetFramework)' == 'net48'">
<Reference Include="Microsoft.CSharp" />
<Reference Include="System" />
<Reference Include="System.Configuration" />
Expand Down
16 changes: 16 additions & 0 deletions tests/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Jil" Version="2.17"/>
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="6.0.10" />
<PackageVersion Include="xunit" Version="2.4.2"/>
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.6.0"/>
</ItemGroup>
<ItemGroup>
<GlobalPackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3"/>
<GlobalPackageReference Include="xunit.runner.visualstudio" Version="2.4.5"/>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
<ItemGroup>
<ProjectReference Include="..\StackExchange.Exceptional.Tests\StackExchange.Exceptional.Tests.csproj" />
<ProjectReference Include="..\..\src\StackExchange.Exceptional.AspNetCore\StackExchange.Exceptional.AspNetCore.csproj" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="6.0.10" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" />
<PackageReference Include="xunit" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
<ProjectReference Include="..\..\src\StackExchange.Exceptional.MySQL\StackExchange.Exceptional.MySQL.csproj" />
<ProjectReference Include="..\..\src\StackExchange.Exceptional.PostgreSql\StackExchange.Exceptional.PostgreSql.csproj" />
<ProjectReference Include="..\..\src\StackExchange.Exceptional.MongoDB\StackExchange.Exceptional.MongoDB.csproj" />
<PackageReference Include="Jil" Version="2.17" />
<PackageReference Include="Jil" />
<PackageReference Include="xunit"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System;
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;
using System.Runtime.CompilerServices;
using Dapper;
using StackExchange.Exceptional.Internal;
Expand Down

0 comments on commit 6713db7

Please sign in to comment.