Skip to content

Commit 7513ec8

Browse files
VL-CZCopilot
andauthored
Upgrade to net10 (#246)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent de16373 commit 7513ec8

22 files changed

Lines changed: 112 additions & 55 deletions

File tree

.github/instructions/default.instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ RefDocGen is a **reference documentation generator for .NET**, installed as a .N
66

77
## Tech Stack
88

9-
- **.NET 8** (target framework: `net8.0`)
9+
- **.NET 10** (target framework: `net10.0`)
1010
- **C#** with nullable reference types enabled and implicit usings
1111
- **Razor SDK** (`Microsoft.NET.Sdk.Razor`) — used for server-side HTML rendering via `HtmlRenderer`, not as a web app
1212
- **Key libraries**: AngleSharp (HTML parsing), CommandLineParser (CLI), Markdig (Markdown), YamlDotNet (YAML config), Serilog (logging), Microsoft.Build (MSBuild integration)

.github/workflows/dotnet.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Setup .NET
3232
uses: actions/setup-dotnet@v3
3333
with:
34-
dotnet-version: 8.0.x
34+
dotnet-version: 10.0.x
3535

3636
- name: Restore dependencies
3737
run: dotnet restore

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Default UI:
3434
## Installation
3535

3636
Prerequisites:
37-
- .NET 8 (or higher)
37+
- .NET 10 (or higher)
3838

3939
Install as a .NET global tool from [NuGet](https://www.nuget.org/packages/RefDocGen):
4040

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ RefDocGen is a reference documentation generator for .NET.
2222
## Installation
2323

2424
Prerequisites:
25-
- .NET 8 (or higher)
25+
- .NET 10 (or higher)
2626

2727
Install as a .NET global tool from [NuGet](https://www.nuget.org/packages/RefDocGen):
2828

src/RefDocGen/AssemblyAnalysis/AssemblyTypeExtractor.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using RefDocGen.CodeElements.Types.Concrete;
99
using RefDocGen.CodeElements.Types.Concrete.Delegate;
1010
using RefDocGen.CodeElements.Types.Concrete.Enum;
11+
using RefDocGen.Tools.Logging;
1112
using RefDocGen.Tools.Exceptions;
1213
using System.Reflection;
1314

@@ -135,11 +136,11 @@ internal TypeRegistry GetDeclaredTypes()
135136
types.AddRange(assembly.GetTypes());
136137
includedAssemblies.Add(assemblyPath);
137138

138-
logger.LogInformation("Assembly {Name} loaded", assemblyPath);
139+
RefDocGenLogMessages.LogAssemblyLoaded(logger, assemblyPath);
139140
}
140141
else
141142
{
142-
logger.LogInformation("Assembly {Name} excluded", assemblyPath);
143+
RefDocGenLogMessages.LogAssemblyExcluded(logger, assemblyPath);
143144
}
144145
}
145146

src/RefDocGen/CodeElements/Members/Concrete/MethodData.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ internal MethodData(
9292
public bool IsFinal => MethodInfo.IsFinal;
9393

9494
/// <inheritdoc/>
95-
public bool IsAsync => MethodInfo.GetCustomAttribute(typeof(AsyncStateMachineAttribute)) != null;
95+
public bool IsAsync => MethodInfo.GetCustomAttribute<AsyncStateMachineAttribute>() != null;
9696

9797
/// <inheritdoc/>
9898
public bool IsSealed => OverridesAnotherMember && IsFinal;

src/RefDocGen/CodeElements/Members/Concrete/ParameterData.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public ParameterData(
4646
public ITypeNameData Type { get; }
4747

4848
/// <inheritdoc/>
49-
public bool IsParamsCollection => ParameterInfo.GetCustomAttribute(typeof(ParamArrayAttribute)) != null;
49+
public bool IsParamsCollection => ParameterInfo.GetCustomAttribute<ParamArrayAttribute>() != null;
5050

5151
/// <inheritdoc/>
5252
public bool IsInput => ParameterInfo.IsIn;

src/RefDocGen/DocExtraction/DocCommentExtractor.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using RefDocGen.DocExtraction.Handlers.Types;
88
using RefDocGen.DocExtraction.InheritDoc;
99
using RefDocGen.DocExtraction.Tools;
10+
using RefDocGen.Tools.Logging;
1011
using RefDocGen.Tools.Xml;
1112
using System.Xml.Linq;
1213

@@ -133,7 +134,7 @@ internal void AddComments()
133134
{
134135
// load the document (preserve the whitespace, as the documentation is to be converted into HTML)
135136
xmlDocument = XDocument.Load(xmlPath, LoadOptions.PreserveWhitespace);
136-
logger.LogInformation("XML documentation file {Name} loaded", xmlPath);
137+
RefDocGenLogMessages.LogXmlDocFileLoaded(logger, xmlPath);
137138
}
138139
catch (FileNotFoundException)
139140
{

src/RefDocGen/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
using RefDocGen.TemplateProcessors.Default;
1111
using RefDocGen.TemplateProcessors.Shared.Languages;
1212
using RefDocGen.Tools.Exceptions;
13+
using RefDocGen.Tools.Logging;
1314
using Serilog;
1415
using Serilog.Events;
1516
using System.Globalization;
@@ -143,7 +144,7 @@ private static async Task Run(IProgramConfiguration config)
143144
if (config.SaveConfig) // save the configuration
144145
{
145146
YamlFileConfiguration.SaveToFile(config);
146-
logger.LogInformation("Configuration saved into {File} file", YamlFileConfiguration.FileName);
147+
RefDocGenLogMessages.LogConfigurationSaved(logger, YamlFileConfiguration.FileName);
147148
}
148149

149150
Console.WriteLine($"Documentation generated in the '{config.OutputDir}' folder");

src/RefDocGen/RefDocGen.csproj

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net8.0</TargetFramework>
5+
<TargetFramework>net10.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
88
<AnalysisMode>recommended</AnalysisMode>
@@ -12,7 +12,7 @@
1212
<PackAsTool>true</PackAsTool>
1313
<ToolCommandName>refdocgen</ToolCommandName>
1414
<PackageOutputPath>./nupkg</PackageOutputPath>
15-
<Version>1.0.6</Version>
15+
<Version>1.1.0</Version>
1616
<Authors>Vojtěch Lengál</Authors>
1717
<Title>RefDocGen</Title>
1818
<Description>Reference Documentation Generator for .NET</Description>
@@ -24,22 +24,22 @@
2424
</PropertyGroup>
2525

2626
<ItemGroup>
27-
<PackageReference Include="AngleSharp" Version="1.3.0" />
27+
<PackageReference Include="AngleSharp" Version="1.4.0" />
2828
<PackageReference Include="CommandLineParser" Version="2.9.1" />
29-
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.11" />
30-
<PackageReference Include="Microsoft.Build" Version="17.8.43" ExcludeAssets="runtime" />
31-
<PackageReference Include="Microsoft.Build.Locator" Version="1.8.1" />
32-
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="9.0.0">
29+
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="10.0.3" />
30+
<PackageReference Include="Microsoft.Build" Version="18.3.3" ExcludeAssets="runtime" />
31+
<PackageReference Include="Microsoft.Build.Locator" Version="1.11.2" />
32+
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="10.0.103">
3333
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3434
<PrivateAssets>all</PrivateAssets>
3535
</PackageReference>
36-
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.6" />
37-
<PackageReference Include="Markdig" Version="0.41.2" />
36+
<PackageReference Include="Microsoft.Extensions.Logging" Version="10.0.3" />
37+
<PackageReference Include="Markdig" Version="1.1.0" />
3838
<InternalsVisibleTo Include="RefDocGen.UnitTests" />
3939
<InternalsVisibleTo Include="RefDocGen.IntegrationTests" />
40-
<PackageReference Include="Serilog" Version="4.3.0" />
41-
<PackageReference Include="Serilog.Extensions.Logging" Version="9.0.2" />
42-
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
40+
<PackageReference Include="Serilog" Version="4.3.1" />
41+
<PackageReference Include="Serilog.Extensions.Logging" Version="10.0.0" />
42+
<PackageReference Include="Serilog.Sinks.Console" Version="6.1.1" />
4343
<PackageReference Include="YamlDotNet" Version="16.3.0" />
4444
</ItemGroup>
4545

0 commit comments

Comments
 (0)