Skip to content

Commit

Permalink
package upgrades (#108)
Browse files Browse the repository at this point in the history
* added directory.build.props file
* upgraded nuget packages in test projects
* upgraded efcore sql server; removed support for .net standard in efcore sql server library
* upgraded nuget packages in ef core library and removed .net standard 2.0 support
* upgraded data.sql library nuget packages
  • Loading branch information
jeremyknight-me authored Mar 1, 2024
1 parent 901e556 commit eb427ba
Show file tree
Hide file tree
Showing 16 changed files with 70 additions and 70 deletions.
11 changes: 11 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project>
<PropertyGroup>
<LangVersion>12.0</LangVersion>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>disable</Nullable>

<Authors>Jeremy Knight</Authors>
<Company>Jeremy Knight</Company>
<Copyright>Copyright Jeremy Knight. All rights reserved.</Copyright>
</PropertyGroup>
</Project>
6 changes: 0 additions & 6 deletions src/JK.Common.Abstractions/JK.Common.Abstractions.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<LangVersion>11.0</LangVersion>
<TargetFrameworks>netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>disable</Nullable>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
<Copyright>Copyright Jeremy Knight. All rights reserved.</Copyright>
<Version>1.1.0</Version>
<Description>Abstractions used in utility libraries which allows for less dependencies to be shared across projects.</Description>
<Company></Company>
<Authors>Jeremy Knight</Authors>
<PackageLicenseUrl></PackageLicenseUrl>
<PackageProjectUrl>https://github.com/jeremyknight-me/JK.Common</PackageProjectUrl>
<RepositoryUrl>https://github.com/jeremyknight-me/JK.Common</RepositoryUrl>
Expand Down
9 changes: 4 additions & 5 deletions src/JK.Common.Data.Sql.Tests/JK.Common.Data.Sql.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<LangVersion>12.0</LangVersion>
<TargetFrameworks>net48;net6.0;net7.0;net8.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.5" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PackageReference Include="coverlet.collector" Version="6.0.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
6 changes: 6 additions & 0 deletions src/JK.Common.Data.Sql/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

Unless otherwise noted, all changes made by [@jeremyknight-me](https://github.com/jeremyknight-me).

## Unreleased

### Changed

- Upgraded `Microsoft.Data.SqlClient` to v5.2.0

## 5.2.0

### Added
Expand Down
5 changes: 1 addition & 4 deletions src/JK.Common.Data.Sql/JK.Common.Data.Sql.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<LangVersion>12.0</LangVersion>
<TargetFrameworks>netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
<Authors>Jeremy Knight</Authors>
<Version>5.2.0</Version>
<Copyright>Copyright Jeremy Knight. All rights reserved.</Copyright>
<Description>A utility library containing extensions to System.Data.SqlClient</Description>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageProjectUrl>https://github.com/jeremyknight-me/JK.Common</PackageProjectUrl>
Expand All @@ -14,7 +11,7 @@

<ItemGroup>
<PackageReference Include="JK.Common.Abstractions" Version="1.1.0" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.1.4" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.0" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 10 additions & 0 deletions src/JK.Common.EntityFrameworkCore.SqlServer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

Unless otherwise noted, all changes made by [@jeremyknight-me](https://github.com/jeremyknight-me).

## Unreleased

### Changed

- Updated `Microsoft.EntityFrameworkCore.SqlServer`

### Removed

- Support for .NET Standard 2.0

## 3.2.0

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

<PropertyGroup>
<LangVersion>12.0</LangVersion>
<TargetFrameworks>netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Version>3.2.0</Version>
<Authors>Jeremy Knight</Authors>
<Company>Jeremy Knight</Company>
<Description>A utility library containing extensions to Microsoft.EntityFrameworkCore.SqlServer</Description>
<Copyright>Copyright Jeremy Knight. All rights reserved.</Copyright>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageProjectUrl>https://github.com/jeremyknight-me/JK.Common</PackageProjectUrl>
<RepositoryUrl>https://github.com/jeremyknight-me/JK.Common</RepositoryUrl>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.2" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net7.0' or '$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.15" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.32" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.16" />
</ItemGroup>

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

<PropertyGroup>
<LangVersion>12.0</LangVersion>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.5" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PackageReference Include="coverlet.collector" Version="6.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.2" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net7.0' or '$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.15" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="7.0.15" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.16" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="7.0.16" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 10 additions & 0 deletions src/JK.Common.EntityFrameworkCore/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

Unless otherwise noted, all changes made by [@jeremyknight-me](https://github.com/jeremyknight-me).

## Unreleased

### Changed

- Updated `Microsoft.EntityFrameworkCore.SqlServer`

### Removed

- Support for .NET Standard 2.0

## 4.1.0

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

<PropertyGroup>
<LangVersion>12.0</LangVersion>
<TargetFrameworks>netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Description>A utility library containing extensions to Microsoft.EntityFrameworkCore</Description>
<PackageProjectUrl>https://github.com/jeremyknight-me/JK.Common</PackageProjectUrl>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<Version>4.1.0</Version>
<Authors>Jeremy Knight</Authors>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<Copyright>Copyright Jeremy Knight. All rights reserved.</Copyright>
<RepositoryUrl>https://github.com/jeremyknight-me/JK.Common</RepositoryUrl>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Text.Json" Version="8.0.1" />
<PackageReference Include="System.Text.Json" Version="8.0.2" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.2" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net7.0' or '$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.15" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.32" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.16" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,20 @@

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
<PackageReference Include="xunit" Version="2.6.5" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PackageReference Include="coverlet.collector" Version="6.0.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<LangVersion>12.0</LangVersion>
<TargetFrameworks>netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Version>3.1.0</Version>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<Description>A utility library containing extensions to FluentValidation</Description>
<Authors>Jeremy Knight</Authors>
<Company>Jeremy Knight</Company>
<Copyright>Copyright Jeremy Knight. All rights reserved.</Copyright>
<PackageProjectUrl>https://github.com/jeremyknight-me/JK.Common</PackageProjectUrl>
<RepositoryUrl>https://github.com/jeremyknight-me/JK.Common</RepositoryUrl>
</PropertyGroup>
Expand Down
7 changes: 3 additions & 4 deletions src/JK.Common.Tests/JK.Common.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<LangVersion>11.0</LangVersion>
<TargetFrameworks>net48;net6.0;net7.0;net8.0</TargetFrameworks>
<IsTestProject>true</IsTestProject>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
3 changes: 2 additions & 1 deletion src/JK.Common.sln
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A59DA4E8-21AA-4D88-A452-6C8152C9FE07}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
Directory.Build.props = Directory.Build.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JK.Common", "JK.Common\JK.Common.csproj", "{AC77BD4A-BA38-449D-8647-F0B780CEF220}"
Expand Down Expand Up @@ -36,7 +37,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Common.EntityFrameworkCore.
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JK.Common.EntityFrameworkCore.SqlServer", "JK.Common.EntityFrameworkCore.SqlServer\JK.Common.EntityFrameworkCore.SqlServer.csproj", "{AC8AFA29-6989-4F3C-B1C8-4520DCF11A3C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JK.Common.Abstractions", "JK.Common.Abstractions\JK.Common.Abstractions.csproj", "{BA8F0E82-64D4-4CBF-9675-7BB87582519B}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JK.Common.Abstractions", "JK.Common.Abstractions\JK.Common.Abstractions.csproj", "{BA8F0E82-64D4-4CBF-9675-7BB87582519B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
8 changes: 4 additions & 4 deletions src/JK.Common/Data/ScalarOperationBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ protected ScalarOperationBase(IAdoConnectionFactory connectionFactory)
{
}

public TValue? Execute(TParameterModel parameterModel)
public TValue Execute(TParameterModel parameterModel)
{
using var command = this.MakeCommand(parameterModel);
this.OpenConnection();
var scalar = command.ExecuteScalar();
return (TValue?)(scalar is null ? null : scalar);
return (TValue)(scalar is null ? null : scalar);
}
}

Expand All @@ -23,11 +23,11 @@ protected ScalarOperationBase(IAdoConnectionFactory connectionFactory)
{
}

public TValue? Execute()
public TValue Execute()
{
using var command = this.MakeCommand();
this.OpenConnection();
var scalar = command.ExecuteScalar();
return (TValue?)(scalar is null ? null : scalar);
return (TValue)(scalar is null ? null : scalar);
}
}
6 changes: 0 additions & 6 deletions src/JK.Common/JK.Common.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<LangVersion>11.0</LangVersion>
<TargetFrameworks>netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>disable</Nullable>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
<Copyright>Copyright Jeremy Knight. All rights reserved.</Copyright>
<Version>5.2.0</Version>
<Description>A utility library containing boilerplate code, extension methods, new classes, and/or improvements to existing classes.</Description>
<Company></Company>
<Authors>Jeremy Knight</Authors>
<PackageLicenseUrl></PackageLicenseUrl>
<PackageProjectUrl>https://github.com/jeremyknight-me/JK.Common</PackageProjectUrl>
<RepositoryUrl>https://github.com/jeremyknight-me/JK.Common</RepositoryUrl>
Expand Down

0 comments on commit eb427ba

Please sign in to comment.