Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLI] Support .NET 9 #1605

Merged
merged 9 commits into from
Jan 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ jobs:
working-directory: src/CommandLine
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.101
- run: dotnet restore
- run: dotnet build --no-restore
- run: dotnet pack --no-build
Expand Down
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- [CLI] Add support for .NET 9 ([PR](https://github.com/dotnet/roslynator/pull/1605))

### Fixed

- Fix refactoring 'Change accessibility' ([RR0186](https://josefpihrt.github.io/docs/roslynator/refactorings/RR0186)) ([PR](https://github.com/dotnet/roslynator/pull/1599))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<PropertyGroup Condition="'$(RoslynatorDotNetCli)' == true">
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net7.0;net8.0;net9.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup Condition="'$(RoslynatorCommandLine)' == true">
Expand Down
2 changes: 1 addition & 1 deletion src/CommandLine/CommandLine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<PropertyGroup Condition="'$(RoslynatorDotNetCli)' == true">
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net7.0;net8.0;net9.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup Condition="'$(RoslynatorCommandLine)' == true">
Expand Down
4 changes: 4 additions & 0 deletions src/CommandLine/DelegateFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,11 @@ private static TDelegate CreateDelegate<TDelegate>(

if (method.IsStatic)
{
#if NETFRAMEWORK
return (TDelegate)method.CreateDelegate(typeof(TDelegate));
#else
return method.CreateDelegate<TDelegate>();
#endif
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/CommandLine/docs/NetCore/NuGetReadme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## Requirements

.NET Core SDK 6.0, 7.0 or 8.0.
.NET Core SDK 7, 8 or 9.

## Installation

Expand Down
2 changes: 1 addition & 1 deletion src/Documentation/SymbolDefinitionDisplay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,7 @@ private static void FormatParameters(

private static int FindParameterListStart(
ISymbol symbol,
IList<SymbolDisplayPart> parts)
ImmutableArray<SymbolDisplayPart>.Builder parts)
{
int parenthesesDepth = 0;
int bracesDepth = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ private static Task<Document> RefactorAsync(
return document.ReplaceMembersAsync(info, newMembers, cancellationToken);
}

private static SyntaxKind GetSingleKindOrDefault(IReadOnlyList<MemberDeclarationSyntax> members)
private static SyntaxKind GetSingleKindOrDefault(MemberDeclarationListSelection members)
{
SyntaxKind kind = members[0].Kind();

Expand Down
2 changes: 1 addition & 1 deletion src/Tools/CodeGeneration/Markdown/MarkdownGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public static string CreateAnalyzerMarkdown(AnalyzerMetadata analyzer, Immutable

static IEnumerable<MElement> CreateSamples(AnalyzerMetadata analyzer)
{
IReadOnlyList<SampleMetadata> samples = analyzer.Samples;
List<SampleMetadata> samples = analyzer.Samples;
LegacyAnalyzerOptionKind kind = analyzer.Kind;

if (samples.Count > 0)
Expand Down
Loading