Skip to content

Commit

Permalink
move to net9 (#657)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp authored Dec 4, 2024
1 parent 053582f commit 76c6767
Show file tree
Hide file tree
Showing 15 changed files with 18 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<AssemblyName>NServiceBus.Attachments.FileShare.Raw</AssemblyName>
<PackageName>NServiceBus.Attachments.FileShare.Raw</PackageName>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<DefineConstants>$(DefineConstants);FileShare;Raw</DefineConstants>
</PropertyGroup>
<ItemGroup>
Expand All @@ -17,10 +17,8 @@
<Compile Include="..\Shared\Extensions.cs" />
<Compile Include="..\Shared\Guard.cs" />

<PackageReference Include="Polyfill" PrivateAssets="all" />
<PackageReference Include="ConfigureAwait.Fody" PrivateAssets="All" />
<PackageReference Include="Fody" PrivateAssets="all" />
<PackageReference Include="ProjectDefaults" PrivateAssets="all" />
<PackageReference Include="System.Text.Json" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<OutputType>Exe</OutputType>
<NoWarn>xUnit1051</NoWarn>
</PropertyGroup>
Expand Down
4 changes: 1 addition & 3 deletions src/Attachments.FileShare/Attachments.FileShare.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@
<PropertyGroup>
<AssemblyName>NServiceBus.Attachments.FileShare</AssemblyName>
<PackageName>NServiceBus.Attachments.FileShare</PackageName>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<DefineConstants>$(DefineConstants);FileShare</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Polyfill" PrivateAssets="all" />
<PackageReference Include="ConfigureAwait.Fody" PrivateAssets="All" />
<PackageReference Include="Fody" PrivateAssets="all" />
<PackageReference Include="NServiceBus" />
<PackageReference Include="ProjectDefaults" PrivateAssets="all" />
<PackageReference Include="System.Text.Json" />
<Using Include="NServiceBus.IMessageHandlerContext" Alias="HandlerContext" />
</ItemGroup>
<Import Project="..\Shared\Shared.projitems" Label="Shared" />
Expand Down
9 changes: 2 additions & 7 deletions src/Attachments.FileShare/Persister/FileHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ public static void CopyAll(DirectoryInfo source, DirectoryInfo target)
}
}

public static async Task<byte[]> ReadBytes(Cancel cancel, string dataFile)
{
await using var fileStream = OpenRead(dataFile);
var bytes = new byte[fileStream.Length];
await fileStream.ReadAsync(bytes, 0, (int) fileStream.Length, cancel);
return bytes;
}
public static Task<byte[]> ReadBytes(Cancel cancel, string dataFile) =>
File.ReadAllBytesAsync(dataFile, cancel);
}
6 changes: 1 addition & 5 deletions src/Attachments.Sql.Raw/Attachments.Sql.Raw.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,14 @@
<PropertyGroup>
<AssemblyName>NServiceBus.Attachments.Sql.Raw</AssemblyName>
<PackageName>NServiceBus.Attachments.Sql.Raw</PackageName>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<DefineConstants>$(DefineConstants);Sql;Raw</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ConfigureAwait.Fody" PrivateAssets="All" />
<PackageReference Include="Fody" PrivateAssets="all" />
<PackageReference Include="Microsoft.Data.SqlClient" />
<PackageReference Include="ProjectDefaults" PrivateAssets="all" />
<PackageReference Include="Polyfill" PrivateAssets="all" />
<PackageReference Include="System.Runtime.Caching" />
<PackageReference Include="System.Text.Json" />

<Compile Include="..\Attachments.Sql\Persister\*.cs" />
<Compile Include="..\Attachments.Sql\Install\Installer.cs" />
<Compile Include="..\Attachments.Sql\SqlSanitizer.cs" />
Expand Down
2 changes: 1 addition & 1 deletion src/Attachments.Sql.Sample/Attachments.Sql.Sample.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/Attachments.Sql.Tests/Attachments.Sql.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<OutputType>Exe</OutputType>
<NoWarn>xUnit1051</NoWarn>
<NoWarn>xUnit1051;CA2022</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MarkdownSnippets.MsBuild" PrivateAssets="all" />
Expand Down
2 changes: 2 additions & 0 deletions src/Attachments.Sql.Tests/StreamWrapperTests.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ReSharper disable MustUseReturnValue
// ReSharper disable StreamReadReturnValueIgnored
public class StreamWrapperTests
{
static byte[] buffer = "content"u8.ToArray();
Expand Down
5 changes: 1 addition & 4 deletions src/Attachments.Sql/Attachments.Sql.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<AssemblyName>NServiceBus.Attachments.Sql</AssemblyName>
<PackageName>NServiceBus.Attachments.Sql</PackageName>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<DefineConstants>$(DefineConstants);Sql</DefineConstants>
</PropertyGroup>
<ItemGroup>
Expand All @@ -13,9 +13,6 @@
<PackageReference Include="NServiceBus" />
<PackageReference Include="Microsoft.Data.SqlClient" />
<PackageReference Include="ProjectDefaults" PrivateAssets="all" />
<PackageReference Include="Polyfill" PrivateAssets="all" />
<PackageReference Include="System.Runtime.Caching" />
<PackageReference Include="System.Text.Json" />
<Using Include="NServiceBus.IMessageHandlerContext" Alias="HandlerContext" />
<Using Include="System.Data.CommandBehavior" Static="True" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<Version>15.1.0</Version>
<Version>16.0.0</Version>
<LangVersion>preview</LangVersion>
<AssemblyVersion>1.0.0</AssemblyVersion>
<PackageTags>NServiceBus, Attachments, DataBus</PackageTags>
Expand Down
6 changes: 1 addition & 5 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,11 @@
<PackageVersion Include="NServiceBus" Version="9.2.3" />
<PackageVersion Include="NServiceBus.Persistence.Sql" Version="8.1.0" />
<PackageVersion Include="NServiceBus.Transport.SqlServer" Version="8.1.6" />
<PackageVersion Include="Polyfill" Version="7.5.0" />
<PackageVersion Include="ProjectDefaults" Version="1.0.144" />
<PackageVersion Include="System.Text.Json" Version="9.0.0" />
<PackageVersion Include="Verify.DiffPlex" Version="3.1.2" />
<PackageVersion Include="Verify.NServiceBus" Version="10.3.4" />
<PackageVersion Include="Verify.XunitV3" Version="28.3.2" />
<PackageVersion Include="Verify.XunitV3" Version="28.4.0" />
<PackageVersion Include="xunit.v3" Version="0.7.0-pre.15" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.0-pre.49" />
<!--CVE-->
<PackageVersion Include="System.Runtime.Caching" Version="9.0.0" />
</ItemGroup>
</Project>
3 changes: 1 addition & 2 deletions src/Helpers/Helpers.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NServiceBus" />
<PackageReference Include="Microsoft.Data.SqlClient" />
<PackageReference Include="ProjectDefaults" PrivateAssets="all" />
<PackageReference Include="System.Runtime.Caching" />
</ItemGroup>
</Project>
3 changes: 1 addition & 2 deletions src/Shared.Tests/Shared.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<OutputType>Exe</OutputType>
<NoWarn>xUnit1051</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Data.SqlClient" />
<PackageReference Include="NServiceBus" />
<PackageReference Include="NServiceBus.Transport.SqlServer" />
<PackageReference Include="System.Text.Json" />
<PackageReference Include="xunit.v3" />
<PackageReference Include="Verify.XunitV3" />
<PackageReference Include="xunit.runner.visualstudio" PrivateAssets="all" />
Expand Down
2 changes: 1 addition & 1 deletion src/global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "9.0.100",
"version": "9.0.101",
"allowPrerelease": true,
"rollForward": "latestFeature"
}
Expand Down

0 comments on commit 76c6767

Please sign in to comment.