Skip to content

Commit 829c331

Browse files
committed
update to .net 8
1 parent 051c039 commit 829c331

File tree

16 files changed

+78
-65
lines changed

16 files changed

+78
-65
lines changed

src/Directory.Build.props

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
</PropertyGroup>
3535

3636
<ItemGroup>
37-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
37+
<PackageReference Include="AssemblyMetadata.Generators" Version="1.1.0" PrivateAssets="All" />
38+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
3839
<PackageReference Include="MinVer" Version="4.3.0" PrivateAssets="All" />
3940
</ItemGroup>
4041

src/FluentCommand.Caching/FluentCommand.Caching.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;net6.0;net7.0</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<ItemGroup>
88
<PackageReference Include="MessagePack" Version="2.5.129" />
9-
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="7.0.0" />
10-
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
9+
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="8.0.0" />
10+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
1111
</ItemGroup>
1212

1313
<ItemGroup>

src/FluentCommand.Generators/DataReaderFactoryWriter.cs

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,7 @@ public static string Generate(EntityClass entityClass)
2626
codeBuilder
2727
.AppendLine("/// <summary>")
2828
.AppendLine("/// Extension methods for FluentCommand")
29-
.AppendLine("/// </summary>");
30-
31-
codeBuilder
32-
.Append("[global::System.CodeDom.Compiler.GeneratedCode(\"")
33-
.Append("FluentCommand.Generators")
34-
.Append("\", \"")
35-
.Append("1.0.0.0")
36-
.AppendLine("\")]");
37-
38-
codeBuilder
39-
.AppendLine("[global::System.Diagnostics.DebuggerNonUserCodeAttribute]")
40-
.AppendLine("[global::System.Diagnostics.DebuggerStepThroughAttribute]")
29+
.AppendLine("/// </summary>")
4130
.Append("public static partial class ")
4231
.Append(entityClass.EntityName)
4332
.AppendLine("DataReaderExtensions")
@@ -83,6 +72,11 @@ private static void WriteQuerySingleEntityTask(IndentedStringBuilder codeBuilder
8372
.Append(entity.EntityName)
8473
.AppendLine("\"/> if row exists; otherwise null.")
8574
.AppendLine("/// </returns>")
75+
.Append("[global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"")
76+
.Append(ThisAssembly.Product)
77+
.Append("\", \"")
78+
.Append(ThisAssembly.InformationalVersion)
79+
.AppendLine("\")]")
8680
.Append("public static global::System.Threading.Tasks.Task<")
8781
.Append(entity.EntityNamespace)
8882
.Append(".")
@@ -140,6 +134,11 @@ private static void WriteQueryEntityTask(IndentedStringBuilder codeBuilder, Enti
140134
.Append(entity.EntityName)
141135
.AppendLine("\"/> objects.")
142136
.AppendLine("/// </returns>")
137+
.Append("[global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"")
138+
.Append(ThisAssembly.Product)
139+
.Append("\", \"")
140+
.Append(ThisAssembly.InformationalVersion)
141+
.AppendLine("\")]")
143142
.Append("public static global::System.Threading.Tasks.Task<global::System.Collections.Generic.IEnumerable<")
144143
.Append(entity.EntityNamespace)
145144
.Append(".")
@@ -194,6 +193,11 @@ private static void WriteQuerySingleEntity(IndentedStringBuilder codeBuilder, En
194193
.Append(entity.EntityName)
195194
.AppendLine("\"/> if row exists; otherwise null.")
196195
.AppendLine("/// </returns>")
196+
.Append("[global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"")
197+
.Append(ThisAssembly.Product)
198+
.Append("\", \"")
199+
.Append(ThisAssembly.InformationalVersion)
200+
.AppendLine("\")]")
197201
.Append("public static ")
198202
.Append(entity.EntityNamespace)
199203
.Append(".")
@@ -247,6 +251,11 @@ private static void WriteQueryEntity(IndentedStringBuilder codeBuilder, EntityCl
247251
.Append(entity.EntityName)
248252
.AppendLine("\"/> objects.")
249253
.AppendLine("/// </returns>")
254+
.Append("[global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"")
255+
.Append(ThisAssembly.Product)
256+
.Append("\", \"")
257+
.Append(ThisAssembly.InformationalVersion)
258+
.AppendLine("\")]")
250259
.Append("public static global::System.Collections.Generic.IEnumerable<")
251260
.Append(entity.EntityNamespace)
252261
.Append(".")
@@ -298,6 +307,11 @@ private static void WriteEntityFactory(IndentedStringBuilder codeBuilder, Entity
298307
.Append(entity.EntityName)
299308
.AppendLine("\"/> having property names set that match the field names in the <paramref name=\"dataRecord\"/>.")
300309
.AppendLine("/// </returns>")
310+
.Append("[global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"")
311+
.Append(ThisAssembly.Product)
312+
.Append("\", \"")
313+
.Append(ThisAssembly.InformationalVersion)
314+
.AppendLine("\")]")
301315
.Append("public static ")
302316
.Append(entity.EntityNamespace)
303317
.Append(".")
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>netstandard2.0;net6.0;net7.0</TargetFrameworks>
3+
<TargetFrameworks>netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
44
<RootNamespace>FluentCommand</RootNamespace>
55
</PropertyGroup>
66

@@ -9,7 +9,7 @@
99
</ItemGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="System.Text.Json" Version="7.0.3" />
12+
<PackageReference Include="System.Text.Json" Version="8.0.0" />
1313
</ItemGroup>
1414

1515
</Project>

src/FluentCommand.SqlServer/FluentCommand.SqlServer.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>netstandard2.0;net6.0;net7.0</TargetFrameworks>
3+
<TargetFrameworks>netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
44
<RootNamespace>FluentCommand</RootNamespace>
55
</PropertyGroup>
66

src/FluentCommand/FluentCommand.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>netstandard2.0;net6.0;net7.0</TargetFrameworks>
3+
<TargetFrameworks>netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
44
</PropertyGroup>
55

66
<ItemGroup>
7-
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="7.0.0" />
8-
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
9-
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
7+
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
8+
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
9+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
1010
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
1111
</ItemGroup>
1212

test/FluentCommand.Entities/FluentCommand.Entities.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;net6.0;net7.0</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
<LangVersion>latest</LangVersion>
77
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>

test/FluentCommand.Generators.Tests/DataReaderFactoryWriterTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public async Task Generate()
2828

2929
await Verifier
3030
.Verify(source)
31-
.UseDirectory("Snapshots");
31+
.UseDirectory("Snapshots")
32+
.ScrubLinesContaining("GeneratedCodeAttribute");
3233
}
3334
}

test/FluentCommand.Generators.Tests/FluentCommand.Generators.Tests.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<IsPackable>false</IsPackable>
@@ -19,10 +19,10 @@
1919
<PrivateAssets>all</PrivateAssets>
2020
</PackageReference>
2121
<PackageReference Include="FluentAssertions" Version="6.12.0" />
22-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
23-
<PackageReference Include="Verify.Xunit" Version="22.1.4" />
24-
<PackageReference Include="xunit" Version="2.5.3" />
25-
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
22+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
23+
<PackageReference Include="Verify.Xunit" Version="22.5.0" />
24+
<PackageReference Include="xunit" Version="2.6.2" />
25+
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4">
2626
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2727
<PrivateAssets>all</PrivateAssets>
2828
</PackageReference>

test/FluentCommand.Generators.Tests/Snapshots/DataReaderFactoryWriterTests.Generate.verified.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ namespace FluentCommand.Entities
88
/// <summary>
99
/// Extension methods for FluentCommand
1010
/// </summary>
11-
[global::System.CodeDom.Compiler.GeneratedCode("FluentCommand.Generators", "1.0.0.0")]
12-
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
13-
[global::System.Diagnostics.DebuggerStepThroughAttribute]
1411
public static partial class StatusDataReaderExtensions
1512
{
1613
/// <summary>

0 commit comments

Comments
 (0)