Skip to content

Commit

Permalink
Updating packages (#548)
Browse files Browse the repository at this point in the history
  • Loading branch information
ardalis authored Oct 3, 2024
1 parent b067397 commit 517469f
Show file tree
Hide file tree
Showing 28 changed files with 269 additions and 47 deletions.
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<PackageProjectUrl>https://github.com/ardalis/SmartEnum</PackageProjectUrl>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<TargetFrameworks>net7.0;net6.0;net8.0;netstandard2.0</TargetFrameworks>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<TargetFrameworks>net6.0;net7.0;net8.0;netstandard2.0</TargetFrameworks>
<!-- <TreatWarningsAsErrors>true</TreatWarningsAsErrors> -->
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Version>8.0.0</Version>
<LangVersion>11</LangVersion>
Expand Down
24 changes: 13 additions & 11 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,36 @@
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Ardalis.GuardClauses" Version="4.5.0" />
<PackageVersion Include="Ardalis.GuardClauses" Version="5.0.0" />
<PackageVersion Include="AutoFixture" Version="4.18.1" />
<PackageVersion Include="BenchmarkDotNet" Version="0.13.12" />
<PackageVersion Include="BenchmarkDotNet" Version="0.14.0" />
<PackageVersion Include="Constant" Version="2.0.4" />
<PackageVersion Include="coverlet.collector" Version="6.0.2" />
<PackageVersion Include="coverlet.msbuild" Version="6.0.2" />
<PackageVersion Include="Dapper" Version="2.1.28" />
<PackageVersion Include="Dapper" Version="2.1.35" />
<PackageVersion Include="Enums.NET" Version="5.0.0" />
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
<PackageVersion Include="MessagePack" Version="2.5.140" />
<PackageVersion Include="FluentAssertions" Version="6.12.1" />
<PackageVersion Include="MessagePack" Version="2.5.172" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
<PackageVersion Include="Microsoft.Data.Sqlite" Version="7.0.13" />
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="7.0.13" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.13" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.13" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageVersion Include="Moq" Version="4.18.4" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.2" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="protobuf-net" Version="3.2.30" />
<PackageVersion Include="SonarAnalyzer.CSharp" Version="9.12.0.78982" />
<PackageVersion Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageVersion Include="System.Net.Http" Version="4.3.4" />
<PackageVersion Include="System.Text.Encodings.Web" Version="8.0.0" />
<PackageVersion Include="System.Text.Json" Version="8.0.4" />
<PackageVersion Include="System.Text.RegularExpressions" Version="4.3.1" />
<PackageVersion Include="Utf8Json" Version="1.3.7" />
<PackageVersion Include="xunit" Version="2.7.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.1" />
<PackageVersion Include="xunit" Version="2.9.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
</ItemGroup>
<ItemGroup>
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<GlobalPackageReference Include="SonarAnalyzer.CSharp" Version="9.25.1.91650" PrivateAssets="All" />
<GlobalPackageReference Include="SonarAnalyzer.CSharp" Version="9.25.1.91650" PrivateAssets="All" />
</ItemGroup>
</Project>
15 changes: 12 additions & 3 deletions benchmarks/SmartEnum.Benchmarks/SmartEnum.Benchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,22 @@
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" />
<PackageReference Include="Constant" />
<PackageReference Include="Enums.NET" />
<PackageReference Include="BenchmarkDotNet" />
<PackageReference Include="Constant" />
<PackageReference Include="Enums.NET" />
<ProjectReference Include="..\..\src\SmartEnum.MessagePack\SmartEnum.MessagePack.csproj" />
<ProjectReference Include="..\..\src\SmartEnum\SmartEnum.csproj" />
<ProjectReference Include="..\..\src\SmartEnum.JsonNet\SmartEnum.JsonNet.csproj" />
<ProjectReference Include="..\..\src\SmartEnum.Utf8Json\SmartEnum.Utf8Json.csproj" />
<ProjectReference Include="..\..\src\SmartEnum.ProtoBufNet\SmartEnum.ProtoBufNet.csproj" />
</ItemGroup>
<ItemGroup>
<PackageVersion Update="SonarAnalyzer.CSharp" Version="9.32.0.97167" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="SonarAnalyzer.CSharp">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
11 changes: 11 additions & 0 deletions src/SmartEnum.AutoFixture/SmartEnum.AutoFixture.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,22 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AutoFixture" />
<PackageReference Include="System.Net.Http" />
<PackageReference Include="System.Text.RegularExpressions" />
</ItemGroup>
<ItemGroup>
<None Include="$(SolutionDir)img\icon.png" Pack="true" Visible="false" PackagePath="" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SmartEnum\SmartEnum.csproj" />
</ItemGroup>
<ItemGroup>
<PackageVersion Update="SonarAnalyzer.CSharp" Version="9.32.0.97167" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="SonarAnalyzer.CSharp">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
9 changes: 9 additions & 0 deletions src/SmartEnum.Dapper/SmartEnum.Dapper.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,13 @@
<ItemGroup>
<ProjectReference Include="..\SmartEnum\SmartEnum.csproj" />
</ItemGroup>
<ItemGroup>
<PackageVersion Update="SonarAnalyzer.CSharp" Version="9.32.0.97167" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="SonarAnalyzer.CSharp">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
10 changes: 10 additions & 0 deletions src/SmartEnum.EFCore/SmartEnum.EFCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,19 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" />
<PackageReference Include="System.Text.Json" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SmartEnum\SmartEnum.csproj" />
</ItemGroup>
<ItemGroup>
<PackageVersion Update="SonarAnalyzer.CSharp" Version="9.32.0.97167" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="SonarAnalyzer.CSharp">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
9 changes: 9 additions & 0 deletions src/SmartEnum.GuardClauses/SmartEnum.GuardClauses.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,13 @@
<ItemGroup>
<ProjectReference Include="..\SmartEnum\SmartEnum.csproj" />
</ItemGroup>
<ItemGroup>
<PackageVersion Update="SonarAnalyzer.CSharp" Version="9.32.0.97167" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="SonarAnalyzer.CSharp">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
11 changes: 10 additions & 1 deletion src/SmartEnum.JsonNet/SmartEnum.JsonNet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,21 @@
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="Newtonsoft.Json" />
</ItemGroup>
<ItemGroup>
<None Include="$(SolutionDir)img\icon.png" Pack="true" Visible="false" PackagePath="" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SmartEnum\SmartEnum.csproj" />
</ItemGroup>
<ItemGroup>
<PackageVersion Update="SonarAnalyzer.CSharp" Version="9.32.0.97167" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="SonarAnalyzer.CSharp">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
8 changes: 5 additions & 3 deletions src/SmartEnum.ModelBinding/SmartEnum.ModelBinding.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core"/>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="System.Text.Encodings.Web" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SmartEnum\SmartEnum.csproj"/>
<ProjectReference Include="..\SmartEnum\SmartEnum.csproj" />
</ItemGroup>
<ItemGroup>
<None Include="$(SolutionDir)img\icon.png" Pack="true" Visible="false" PackagePath=""/>
<None Include="$(SolutionDir)img\icon.png" Pack="true" Visible="false" PackagePath="" />
</ItemGroup>
</Project>
9 changes: 9 additions & 0 deletions src/SmartEnum.ProtoBufNet/SmartEnum.ProtoBufNet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,13 @@
<ItemGroup>
<ProjectReference Include="..\SmartEnum\SmartEnum.csproj" />
</ItemGroup>
<ItemGroup>
<PackageVersion Update="SonarAnalyzer.CSharp" Version="9.32.0.97167" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="SonarAnalyzer.CSharp">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
9 changes: 9 additions & 0 deletions src/SmartEnum.SystemTextJson/SmartEnum.SystemTextJson.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,13 @@
<ItemGroup>
<ProjectReference Include="..\SmartEnum\SmartEnum.csproj" />
</ItemGroup>
<ItemGroup>
<PackageVersion Update="SonarAnalyzer.CSharp" Version="9.32.0.97167" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="SonarAnalyzer.CSharp">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
9 changes: 9 additions & 0 deletions src/SmartEnum.Utf8Json/SmartEnum.Utf8Json.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,13 @@
<ItemGroup>
<ProjectReference Include="..\SmartEnum\SmartEnum.csproj" />
</ItemGroup>
<ItemGroup>
<PackageVersion Update="SonarAnalyzer.CSharp" Version="9.32.0.97167" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="SonarAnalyzer.CSharp">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
9 changes: 9 additions & 0 deletions src/SmartEnum/SmartEnum.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,13 @@
<ItemGroup Condition="'$(TargetFramework)' == 'netStandard2.0'">
<PackageReference Include="System.ComponentModel.Annotations" />
</ItemGroup>
<ItemGroup>
<PackageVersion Update="SonarAnalyzer.CSharp" Version="9.32.0.97167" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="SonarAnalyzer.CSharp">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.msbuild" >
<PackageReference Include="coverlet.msbuild">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand All @@ -28,4 +28,13 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<PackageVersion Update="SonarAnalyzer.CSharp" Version="9.32.0.97167" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="SonarAnalyzer.CSharp">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio" >
<PackageReference Include="xunit.runner.visualstudio">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand All @@ -20,4 +20,15 @@
<ProjectReference Include="..\..\src\SmartEnum.Dapper\SmartEnum.Dapper.csproj" />
</ItemGroup>

<ItemGroup>
<PackageVersion Update="SonarAnalyzer.CSharp" Version="9.32.0.97167" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="SonarAnalyzer.CSharp">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
16 changes: 8 additions & 8 deletions test/SmartEnum.Dapper.IntegrationTests/SmartEnumDapperTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ private class TestObject<TEnum>

private class EnumA : SmartEnum<EnumA>
{
public static readonly EnumA One = new(1);
//public static readonly EnumA One = new(1);
public static readonly EnumA Two = new(2);
public static readonly EnumA Three = new(3);
//public static readonly EnumA Three = new(3);

protected EnumA(int value, [CallerMemberName] string name = null) : base(name, value)
{
Expand All @@ -84,9 +84,9 @@ protected EnumA(int value, [CallerMemberName] string name = null) : base(name, v

private class EnumB : SmartEnum<EnumB>
{
public static readonly EnumB One = new(1);
//public static readonly EnumB One = new(1);
public static readonly EnumB Two = new(2);
public static readonly EnumB Three = new(3);
//public static readonly EnumB Three = new(3);

protected EnumB(int value, [CallerMemberName] string name = null) : base(name, value)
{
Expand All @@ -95,9 +95,9 @@ protected EnumB(int value, [CallerMemberName] string name = null) : base(name, v

private class TestDapperEnumByName : DapperSmartEnumByName<TestDapperEnumByName>
{
public static readonly TestDapperEnumByName One = new(1);
//public static readonly TestDapperEnumByName One = new(1);
public static readonly TestDapperEnumByName Two = new(2);
public static readonly TestDapperEnumByName Three = new(3);
//public static readonly TestDapperEnumByName Three = new(3);

protected TestDapperEnumByName(int value, [CallerMemberName] string name = null) : base(name, value)
{
Expand All @@ -106,9 +106,9 @@ protected TestDapperEnumByName(int value, [CallerMemberName] string name = null)

private class TestDapperEnumByValue : DapperSmartEnumByValue<TestDapperEnumByValue>
{
public static readonly TestDapperEnumByValue One = new(1);
//public static readonly TestDapperEnumByValue One = new(1);
public static readonly TestDapperEnumByValue Two = new(2);
public static readonly TestDapperEnumByValue Three = new(3);
//public static readonly TestDapperEnumByValue Three = new(3);

protected TestDapperEnumByValue(int value, [CallerMemberName] string name = null) : base(name, value)
{
Expand Down
15 changes: 13 additions & 2 deletions test/SmartEnum.Dapper.UnitTests/SmartEnum.Dapper.UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="Moq" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio" >
<PackageReference Include="xunit.runner.visualstudio">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand All @@ -19,4 +19,15 @@
<ProjectReference Include="..\..\src\SmartEnum.Dapper\SmartEnum.Dapper.csproj" />
</ItemGroup>

<ItemGroup>
<PackageVersion Update="SonarAnalyzer.CSharp" Version="9.32.0.97167" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="SonarAnalyzer.CSharp">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,15 @@
<ProjectReference Include="..\..\src\SmartEnum.EFCore\SmartEnum.EFCore.csproj" />
</ItemGroup>

<ItemGroup>
<PackageVersion Update="SonarAnalyzer.CSharp" Version="9.32.0.97167" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="SonarAnalyzer.CSharp">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
Loading

0 comments on commit 517469f

Please sign in to comment.