diff --git a/.github/workflows/format_repositories.yml b/.github/workflows/format_repositories.yml index 18359d7b7..36f5a969e 100644 --- a/.github/workflows/format_repositories.yml +++ b/.github/workflows/format_repositories.yml @@ -18,4 +18,4 @@ jobs: repository: belav/csharpier-repos path: csharpier-repos - run: dotnet build csharpier/Src/CSharpier.Cli/CSharpier.Cli.csproj -c release - - run: dotnet csharpier/Src/CSharpier.Cli/bin/release/net8.0/dotnet-csharpier.dll csharpier-repos --skip-write + - run: dotnet csharpier/Src/CSharpier.Cli/bin/release/net9.0/dotnet-csharpier.dll csharpier-repos --skip-write diff --git a/.run/Playground.run.xml b/.run/Playground.run.xml index 16fffa74c..954597bda 100644 --- a/.run/Playground.run.xml +++ b/.run/Playground.run.xml @@ -1,7 +1,7 @@ <component name="ProjectRunConfigurationManager"> <configuration default="false" name="Playground" type="LaunchSettings" factoryName=".NET Launch Settings Profile"> <option name="LAUNCH_PROFILE_PROJECT_FILE_PATH" value="$PROJECT_DIR$/Src/CSharpier.Playground/CSharpier.Playground.csproj" /> - <option name="LAUNCH_PROFILE_TFM" value="net7.0" /> + <option name="LAUNCH_PROFILE_TFM" value="net9.0" /> <option name="LAUNCH_PROFILE_NAME" value="Watch" /> <option name="USE_EXTERNAL_CONSOLE" value="0" /> <option name="USE_MONO" value="0" /> diff --git a/Directory.Build.props b/Directory.Build.props index 091ac51e5..30111e3a6 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,6 +1,6 @@ <Project> <PropertyGroup> - <TargetFrameworks>net8.0</TargetFrameworks> + <TargetFrameworks>net9.0</TargetFrameworks> <LangVersion>12</LangVersion> <ImplicitUsings>enable</ImplicitUsings> <Nullable>enable</Nullable> diff --git a/Scripts/RunLinuxTests.ps1 b/Scripts/RunLinuxTests.ps1 index 5dc30aeb0..6f4d00fed 100644 --- a/Scripts/RunLinuxTests.ps1 +++ b/Scripts/RunLinuxTests.ps1 @@ -1,7 +1,7 @@ # running this seems to screw up the nuget restore, but provides a way to figure out why a test is failing on linux while working on windows. # you have to run this from the root, IE powershell ./Scripts/RunLinuxTests.ps1 # also a lot of these tests fail due to line endings in your local files being \r\n but the writeLine using \n -docker run --rm -v ${pwd}:/app -e "NormalizeLineEndings=1" -w /app/tests mcr.microsoft.com/dotnet/sdk:7.0 dotnet test /app/Src/CSharpier.Tests/CSharpier.Tests.csproj --logger:trx +docker run --rm -v ${pwd}:/app -e "NormalizeLineEndings=1" -w /app/tests mcr.microsoft.com/dotnet/sdk:9.0 dotnet test /app/Src/CSharpier.Tests/CSharpier.Tests.csproj --logger:trx # gross way to run csharpier against the csharpier-repos -#docker run --rm -v ${pwd}:/app -e "NormalizeLineEndings=1" -w /app mcr.microsoft.com/dotnet/sdk:5.0 dotnet ./csharpier/Src/CSharpier/bin/Debug/net6.0/dotnet-csharpier.dll csharpier-repos --skip-write +#docker run --rm -v ${pwd}:/app -e "NormalizeLineEndings=1" -w /app mcr.microsoft.com/dotnet/sdk:9.0 dotnet ./csharpier/Src/CSharpier/bin/Debug/net9.0/dotnet-csharpier.dll csharpier-repos --skip-write diff --git a/Src/CSharpier.Cli/CSharpier.Cli.csproj b/Src/CSharpier.Cli/CSharpier.Cli.csproj index 81c3d23ec..3992eb21f 100644 --- a/Src/CSharpier.Cli/CSharpier.Cli.csproj +++ b/Src/CSharpier.Cli/CSharpier.Cli.csproj @@ -4,7 +4,7 @@ <OutputType>Exe</OutputType> <PackageId>CSharpier</PackageId> <AssemblyName>dotnet-csharpier</AssemblyName> - <TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks> + <TargetFrameworks>net8.0;net9.0</TargetFrameworks> <PackAsTool>true</PackAsTool> <ToolCommandName>csharpier</ToolCommandName> <AssemblyOriginatorKeyFile>../../Nuget/csharpier.snk</AssemblyOriginatorKeyFile> diff --git a/Src/CSharpier.FakeGenerators/SyntaxNodeComparerGenerator.cs b/Src/CSharpier.FakeGenerators/SyntaxNodeComparerGenerator.cs index 1ec251322..cd63884b9 100644 --- a/Src/CSharpier.FakeGenerators/SyntaxNodeComparerGenerator.cs +++ b/Src/CSharpier.FakeGenerators/SyntaxNodeComparerGenerator.cs @@ -75,7 +75,7 @@ private CompareResult Compare( sourceBuilder.AppendLine( $""" case {syntaxNodeType.Name} {lowerCaseName}: - if (this.IgnoreDisabledText) + if (this.ReorderedUsingsWithDisabledText) return Equal; return this.Compare{syntaxNodeType.Name}({lowerCaseName}, formattedNode as {syntaxNodeType.Name}); """ diff --git a/Src/CSharpier.MsBuild/CSharpier.MsBuild.csproj b/Src/CSharpier.MsBuild/CSharpier.MsBuild.csproj index 7bddfd6ca..72eec2d88 100644 --- a/Src/CSharpier.MsBuild/CSharpier.MsBuild.csproj +++ b/Src/CSharpier.MsBuild/CSharpier.MsBuild.csproj @@ -1,7 +1,7 @@ <Project Sdk="Microsoft.NET.Sdk"> <Import Project="../../Nuget/Build.props"/> <PropertyGroup> - <TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks> + <TargetFrameworks>net8.0;net9.0</TargetFrameworks> <PackageId>CSharpier.MsBuild</PackageId> <DevelopmentDependency>true</DevelopmentDependency> <CSharpierOutputDir>../CSharpier.Cli/bin/$(Configuration)/$(TargetFramework)</CSharpierOutputDir> @@ -10,7 +10,7 @@ <!-- Note: There is no <ProjectReference /> here because that would cause msbuild to make it a dependency in the output package, which causes all sorts of issues as - CSharpier is a net6.0 project with <PackAsTool> and this is neither. + CSharpier is a net9.0 project with <PackAsTool> and this is neither. --> <Target Name="BuildCSharpier" BeforeTargets="Restore"> <Exec command="dotnet build -c $(Configuration)" WorkingDirectory="../CSharpier.Cli" /> diff --git a/Src/CSharpier.MsBuild/build/CSharpier.MsBuild.targets b/Src/CSharpier.MsBuild/build/CSharpier.MsBuild.targets index 4af14af55..b9f292b3b 100644 --- a/Src/CSharpier.MsBuild/build/CSharpier.MsBuild.targets +++ b/Src/CSharpier.MsBuild/build/CSharpier.MsBuild.targets @@ -1,8 +1,7 @@ <Project> <PropertyGroup> + <CSharpier_FrameworkVersion Condition="'$(CSharpier_FrameworkVersion)' == '' and $([MSBuild]::VersionGreaterThanOrEquals($(NETCoreSdkVersion), '9.0'))">net9.0</CSharpier_FrameworkVersion> <CSharpier_FrameworkVersion Condition="'$(CSharpier_FrameworkVersion)' == '' and $([MSBuild]::VersionGreaterThanOrEquals($(NETCoreSdkVersion), '8.0'))">net8.0</CSharpier_FrameworkVersion> - <CSharpier_FrameworkVersion Condition="'$(CSharpier_FrameworkVersion)' == '' and $([MSBuild]::VersionGreaterThanOrEquals($(NETCoreSdkVersion), '7.0'))">net7.0</CSharpier_FrameworkVersion> - <CSharpier_FrameworkVersion Condition="'$(CSharpier_FrameworkVersion)' == '' and $([MSBuild]::VersionGreaterThanOrEquals($(NETCoreSdkVersion), '6.0'))">net6.0</CSharpier_FrameworkVersion> <CSharpier_FrameworkVersion Condition="'$(CSharpier_FrameworkVersion)' == ''" Label="Fallback">net8.0</CSharpier_FrameworkVersion> <CSharpierDllPath>$(MSBuildThisFileDirectory)../tools/csharpier/$(CSharpier_FrameworkVersion)/dotnet-csharpier.dll</CSharpierDllPath> <CSharpierArgs Condition="'$(CSharpier_Check)' == 'true'">$(CSharpierArgs) --check</CSharpierArgs> diff --git a/Src/CSharpier.Tests/CSharpier.Tests.csproj b/Src/CSharpier.Tests/CSharpier.Tests.csproj index c646b2636..2087b910a 100644 --- a/Src/CSharpier.Tests/CSharpier.Tests.csproj +++ b/Src/CSharpier.Tests/CSharpier.Tests.csproj @@ -5,6 +5,8 @@ <EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles> <AssemblyOriginatorKeyFile>../../Nuget/csharpier.snk</AssemblyOriginatorKeyFile> <SignAssembly>True</SignAssembly> + <!-- NU1902/3/4 is for vulnerabilities, and DiffEngine references older packages. --> + <NoWarn>NU1902;NU1903;NU1904</NoWarn> </PropertyGroup> <ItemGroup> <PackageReference Include="DiffEngine" /> diff --git a/Src/CSharpier.Tests/FormattingTests/TestFiles/cs/AllowsRefStruct.test b/Src/CSharpier.Tests/FormattingTests/TestFiles/cs/AllowsRefStruct.test new file mode 100644 index 000000000..f6f7db7c0 --- /dev/null +++ b/Src/CSharpier.Tests/FormattingTests/TestFiles/cs/AllowsRefStruct.test @@ -0,0 +1,9 @@ +public class C<T> + where T : allows ref struct +{ + // Use T as a ref struct: + public void M(scoped T p) + { + // The parameter p must follow ref safety rules + } +} diff --git a/Src/CSharpier/CSharpier.csproj b/Src/CSharpier/CSharpier.csproj index 4f9609855..791232ca1 100644 --- a/Src/CSharpier/CSharpier.csproj +++ b/Src/CSharpier/CSharpier.csproj @@ -2,7 +2,7 @@ <Import Project="../../Nuget/Build.props" /> <PropertyGroup> <PackageId>CSharpier.Core</PackageId> - <TargetFrameworks>net6.0;net7.0;net8.0;netstandard2.0</TargetFrameworks> + <TargetFrameworks>net8.0;net9.0;netstandard2.0</TargetFrameworks> <RootNamespace>CSharpier</RootNamespace> <EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles> <AssemblyOriginatorKeyFile>../../Nuget/csharpier.snk</AssemblyOriginatorKeyFile> diff --git a/Src/CSharpier/SyntaxNodeComparer.generated.cs b/Src/CSharpier/SyntaxNodeComparer.generated.cs index ddcd4b8f4..86b4d7f4b 100644 --- a/Src/CSharpier/SyntaxNodeComparer.generated.cs +++ b/Src/CSharpier/SyntaxNodeComparer.generated.cs @@ -44,6 +44,8 @@ private CompareResult Compare( return this.CompareAccessorListSyntax(accessorListSyntax, formattedNode as AccessorListSyntax); case AliasQualifiedNameSyntax aliasQualifiedNameSyntax: return this.CompareAliasQualifiedNameSyntax(aliasQualifiedNameSyntax, formattedNode as AliasQualifiedNameSyntax); + case AllowsConstraintClauseSyntax allowsConstraintClauseSyntax: + return this.CompareAllowsConstraintClauseSyntax(allowsConstraintClauseSyntax, formattedNode as AllowsConstraintClauseSyntax); case AnonymousMethodExpressionSyntax anonymousMethodExpressionSyntax: return this.CompareAnonymousMethodExpressionSyntax(anonymousMethodExpressionSyntax, formattedNode as AnonymousMethodExpressionSyntax); case AnonymousObjectCreationExpressionSyntax anonymousObjectCreationExpressionSyntax: @@ -390,6 +392,8 @@ private CompareResult Compare( return this.CompareReferenceDirectiveTriviaSyntax(referenceDirectiveTriviaSyntax, formattedNode as ReferenceDirectiveTriviaSyntax); case RefExpressionSyntax refExpressionSyntax: return this.CompareRefExpressionSyntax(refExpressionSyntax, formattedNode as RefExpressionSyntax); + case RefStructConstraintSyntax refStructConstraintSyntax: + return this.CompareRefStructConstraintSyntax(refStructConstraintSyntax, formattedNode as RefStructConstraintSyntax); case RefTypeExpressionSyntax refTypeExpressionSyntax: return this.CompareRefTypeExpressionSyntax(refTypeExpressionSyntax, formattedNode as RefTypeExpressionSyntax); case RefTypeSyntax refTypeSyntax: @@ -473,6 +477,8 @@ private CompareResult Compare( case UnsafeStatementSyntax unsafeStatementSyntax: return this.CompareUnsafeStatementSyntax(unsafeStatementSyntax, formattedNode as UnsafeStatementSyntax); case UsingDirectiveSyntax usingDirectiveSyntax: + if (this.ReorderedUsingsWithDisabledText) + return Equal; return this.CompareUsingDirectiveSyntax(usingDirectiveSyntax, formattedNode as UsingDirectiveSyntax); case UsingStatementSyntax usingStatementSyntax: return this.CompareUsingStatementSyntax(usingStatementSyntax, formattedNode as UsingStatementSyntax); @@ -576,6 +582,18 @@ private CompareResult CompareAliasQualifiedNameSyntax(AliasQualifiedNameSyntax o formattedStack.Push((formattedNode.Name, formattedNode)); return Equal; } + private CompareResult CompareAllowsConstraintClauseSyntax(AllowsConstraintClauseSyntax originalNode, AllowsConstraintClauseSyntax formattedNode) + { + CompareResult result; + result = this.Compare(originalNode.AllowsKeyword, formattedNode.AllowsKeyword, originalNode, formattedNode); + if (result.IsInvalid) return result; + result = this.CompareLists(originalNode.Constraints, formattedNode.Constraints, null, o => o.Span, originalNode.Span, formattedNode.Span); + if (result.IsInvalid) return result; + result = this.CompareLists(originalNode.Constraints.GetSeparators().Take(originalNode.Constraints.Count() - 1).ToList(), formattedNode.Constraints.GetSeparators().Take(formattedNode.Constraints.Count() - 1).ToList(), Compare, o => o.Span, originalNode.Span, formattedNode.Span); + if (result.IsInvalid) return result; + if (originalNode.IsMissing != formattedNode.IsMissing) return NotEqual(originalNode, formattedNode); + return Equal; + } private CompareResult CompareAnonymousMethodExpressionSyntax(AnonymousMethodExpressionSyntax originalNode, AnonymousMethodExpressionSyntax formattedNode) { CompareResult result; @@ -3127,6 +3145,16 @@ private CompareResult CompareRefExpressionSyntax(RefExpressionSyntax originalNod if (result.IsInvalid) return result; return Equal; } + private CompareResult CompareRefStructConstraintSyntax(RefStructConstraintSyntax originalNode, RefStructConstraintSyntax formattedNode) + { + CompareResult result; + if (originalNode.IsMissing != formattedNode.IsMissing) return NotEqual(originalNode, formattedNode); + result = this.Compare(originalNode.RefKeyword, formattedNode.RefKeyword, originalNode, formattedNode); + if (result.IsInvalid) return result; + result = this.Compare(originalNode.StructKeyword, formattedNode.StructKeyword, originalNode, formattedNode); + if (result.IsInvalid) return result; + return Equal; + } private CompareResult CompareRefTypeExpressionSyntax(RefTypeExpressionSyntax originalNode, RefTypeExpressionSyntax formattedNode) { CompareResult result; diff --git a/Src/CSharpier/SyntaxNodeJsonWriter.generated.cs b/Src/CSharpier/SyntaxNodeJsonWriter.generated.cs index 5d4bae0e8..b0d8cdd97 100644 --- a/Src/CSharpier/SyntaxNodeJsonWriter.generated.cs +++ b/Src/CSharpier/SyntaxNodeJsonWriter.generated.cs @@ -15,6 +15,7 @@ public static void WriteSyntaxNode(StringBuilder builder, SyntaxNode syntaxNode) if (syntaxNode is AccessorDeclarationSyntax) WriteAccessorDeclarationSyntax(builder, syntaxNode as AccessorDeclarationSyntax); if (syntaxNode is AccessorListSyntax) WriteAccessorListSyntax(builder, syntaxNode as AccessorListSyntax); if (syntaxNode is AliasQualifiedNameSyntax) WriteAliasQualifiedNameSyntax(builder, syntaxNode as AliasQualifiedNameSyntax); + if (syntaxNode is AllowsConstraintClauseSyntax) WriteAllowsConstraintClauseSyntax(builder, syntaxNode as AllowsConstraintClauseSyntax); if (syntaxNode is AnonymousMethodExpressionSyntax) WriteAnonymousMethodExpressionSyntax(builder, syntaxNode as AnonymousMethodExpressionSyntax); if (syntaxNode is AnonymousObjectCreationExpressionSyntax) WriteAnonymousObjectCreationExpressionSyntax(builder, syntaxNode as AnonymousObjectCreationExpressionSyntax); if (syntaxNode is AnonymousObjectMemberDeclaratorSyntax) WriteAnonymousObjectMemberDeclaratorSyntax(builder, syntaxNode as AnonymousObjectMemberDeclaratorSyntax); @@ -188,6 +189,7 @@ public static void WriteSyntaxNode(StringBuilder builder, SyntaxNode syntaxNode) if (syntaxNode is RecursivePatternSyntax) WriteRecursivePatternSyntax(builder, syntaxNode as RecursivePatternSyntax); if (syntaxNode is ReferenceDirectiveTriviaSyntax) WriteReferenceDirectiveTriviaSyntax(builder, syntaxNode as ReferenceDirectiveTriviaSyntax); if (syntaxNode is RefExpressionSyntax) WriteRefExpressionSyntax(builder, syntaxNode as RefExpressionSyntax); + if (syntaxNode is RefStructConstraintSyntax) WriteRefStructConstraintSyntax(builder, syntaxNode as RefStructConstraintSyntax); if (syntaxNode is RefTypeExpressionSyntax) WriteRefTypeExpressionSyntax(builder, syntaxNode as RefTypeExpressionSyntax); if (syntaxNode is RefTypeSyntax) WriteRefTypeSyntax(builder, syntaxNode as RefTypeSyntax); if (syntaxNode is RefValueExpressionSyntax) WriteRefValueExpressionSyntax(builder, syntaxNode as RefValueExpressionSyntax); @@ -375,6 +377,32 @@ public static void WriteAliasQualifiedNameSyntax(StringBuilder builder, AliasQua builder.Append(string.Join(",", properties.Where(o => o != null))); builder.Append("}"); } + public static void WriteAllowsConstraintClauseSyntax(StringBuilder builder, AllowsConstraintClauseSyntax syntaxNode) + { + builder.Append("{"); + var properties = new List<string>(); + properties.Add($"\"nodeType\":\"{GetNodeType(syntaxNode.GetType())}\""); + properties.Add($"\"kind\":\"{syntaxNode.Kind().ToString()}\""); + if (syntaxNode.AllowsKeyword != default(SyntaxToken)) + { + var allowsKeywordBuilder = new StringBuilder(); + WriteSyntaxToken(allowsKeywordBuilder, syntaxNode.AllowsKeyword); + properties.Add($"\"allowsKeyword\":{allowsKeywordBuilder.ToString()}"); + } + var constraints = new List<string>(); + foreach(var node in syntaxNode.Constraints) + { + var innerBuilder = new StringBuilder(); + WriteSyntaxNode(innerBuilder, node); + constraints.Add(innerBuilder.ToString()); + } + properties.Add($"\"constraints\":[{string.Join(",", constraints)}]"); + properties.Add(WriteBoolean("hasLeadingTrivia", syntaxNode.HasLeadingTrivia)); + properties.Add(WriteBoolean("hasTrailingTrivia", syntaxNode.HasTrailingTrivia)); + properties.Add(WriteBoolean("isMissing", syntaxNode.IsMissing)); + builder.Append(string.Join(",", properties.Where(o => o != null))); + builder.Append("}"); + } public static void WriteAnonymousMethodExpressionSyntax(StringBuilder builder, AnonymousMethodExpressionSyntax syntaxNode) { builder.Append("{"); @@ -2078,6 +2106,12 @@ public static void WriteCrefParameterSyntax(StringBuilder builder, CrefParameter properties.Add(WriteBoolean("hasLeadingTrivia", syntaxNode.HasLeadingTrivia)); properties.Add(WriteBoolean("hasTrailingTrivia", syntaxNode.HasTrailingTrivia)); properties.Add(WriteBoolean("isMissing", syntaxNode.IsMissing)); + if (syntaxNode.ReadOnlyKeyword != default(SyntaxToken)) + { + var readOnlyKeywordBuilder = new StringBuilder(); + WriteSyntaxToken(readOnlyKeywordBuilder, syntaxNode.ReadOnlyKeyword); + properties.Add($"\"readOnlyKeyword\":{readOnlyKeywordBuilder.ToString()}"); + } if (syntaxNode.RefKindKeyword != default(SyntaxToken)) { var refKindKeywordBuilder = new StringBuilder(); @@ -6940,6 +6974,30 @@ public static void WriteRefExpressionSyntax(StringBuilder builder, RefExpression builder.Append(string.Join(",", properties.Where(o => o != null))); builder.Append("}"); } + public static void WriteRefStructConstraintSyntax(StringBuilder builder, RefStructConstraintSyntax syntaxNode) + { + builder.Append("{"); + var properties = new List<string>(); + properties.Add($"\"nodeType\":\"{GetNodeType(syntaxNode.GetType())}\""); + properties.Add($"\"kind\":\"{syntaxNode.Kind().ToString()}\""); + properties.Add(WriteBoolean("hasLeadingTrivia", syntaxNode.HasLeadingTrivia)); + properties.Add(WriteBoolean("hasTrailingTrivia", syntaxNode.HasTrailingTrivia)); + properties.Add(WriteBoolean("isMissing", syntaxNode.IsMissing)); + if (syntaxNode.RefKeyword != default(SyntaxToken)) + { + var refKeywordBuilder = new StringBuilder(); + WriteSyntaxToken(refKeywordBuilder, syntaxNode.RefKeyword); + properties.Add($"\"refKeyword\":{refKeywordBuilder.ToString()}"); + } + if (syntaxNode.StructKeyword != default(SyntaxToken)) + { + var structKeywordBuilder = new StringBuilder(); + WriteSyntaxToken(structKeywordBuilder, syntaxNode.StructKeyword); + properties.Add($"\"structKeyword\":{structKeywordBuilder.ToString()}"); + } + builder.Append(string.Join(",", properties.Where(o => o != null))); + builder.Append("}"); + } public static void WriteRefTypeExpressionSyntax(StringBuilder builder, RefTypeExpressionSyntax syntaxNode) { builder.Append("{"); diff --git a/Src/SyntaxFinder/SyntaxFinder.csproj b/Src/SyntaxFinder/SyntaxFinder.csproj index a93220d83..95099b20f 100644 --- a/Src/SyntaxFinder/SyntaxFinder.csproj +++ b/Src/SyntaxFinder/SyntaxFinder.csproj @@ -1,6 +1,6 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>net8.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> <OutputType>Exe</OutputType> </PropertyGroup> <ItemGroup> diff --git a/docs/MSBuild.md b/docs/MSBuild.md index 700f5f9e3..75c508ab8 100644 --- a/docs/MSBuild.md +++ b/docs/MSBuild.md @@ -51,10 +51,10 @@ Valid options are: - Debug ### Target Frameworks -CSharpier.MSBuild will be run with net6.0, net7.0 or net8.0 if the project targets one of the three frameworks. In cases where the project targets something else (net48, netstandard2.0) `CSharpier_FrameworkVersion` will default to net7.0 -This can be controlled with the following property. This property is required if the csproj is targeting < net6.0 (netstandard2.0, net48, etc) and net7.0 is not installed. +CSharpier.MSBuild will be run with net8.0 or net9.0 if the project targets one of the three frameworks. In cases where the project targets something else (net48, netstandard2.0) `CSharpier_FrameworkVersion` will default to net8.0 +This can be controlled with the following property. This property is required if the csproj is targeting < net8.0 (netstandard2.0, net48, etc) and net8.0 is not installed. ```xml <PropertyGroup> - <CSharpier_FrameworkVersion>net6.0</CSharpier_FrameworkVersion> + <CSharpier_FrameworkVersion>net8.0</CSharpier_FrameworkVersion> </PropertyGroup> ``` diff --git a/global.json b/global.json index bea0ddfc1..82c1266a0 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.401", + "version": "9.0.100-rc.2", "rollForward": "latestFeature" }, "msbuild-sdks": {