diff --git a/.github/workflows/renumber-sections.yaml b/.github/workflows/renumber-sections.yaml
index 40d3ce88a..50781fd34 100644
--- a/.github/workflows/renumber-sections.yaml
+++ b/.github/workflows/renumber-sections.yaml
@@ -26,7 +26,7 @@ jobs:
- name: Setup .NET 10.0
uses: actions/setup-dotnet@v6
with:
- dotnet-version: 10.0.x
+ dotnet-version: 11.0.x
- name: Run section renumbering
env:
diff --git a/.github/workflows/test-examples.yaml b/.github/workflows/test-examples.yaml
index d8b43f545..469c58646 100644
--- a/.github/workflows/test-examples.yaml
+++ b/.github/workflows/test-examples.yaml
@@ -34,12 +34,13 @@ jobs:
# 10.0 for the tools themselves. (The closer we
# are to the target language version we're standardising,
# the better.)
- - name: Setup .NET 8.0 and 10.0
+ - name: Setup .NET 8.0, 10.0, and 11.0
uses: actions/setup-dotnet@v6
with:
dotnet-version: |
8.0.x
10.0.x
+ 11.0.x
- name: Extract and validate tests
env:
diff --git a/.github/workflows/tools-tests.yaml b/.github/workflows/tools-tests.yaml
index aedfbbc7a..d59566ff6 100644
--- a/.github/workflows/tools-tests.yaml
+++ b/.github/workflows/tools-tests.yaml
@@ -28,7 +28,7 @@ jobs:
- name: Setup .NET 10.0
uses: actions/setup-dotnet@v6
with:
- dotnet-version: 10.0.x
+ dotnet-version: 11.0.x
- name: Run all tests
run: |
diff --git a/.github/workflows/update-on-merge.yaml b/.github/workflows/update-on-merge.yaml
index 951759062..587612ec3 100644
--- a/.github/workflows/update-on-merge.yaml
+++ b/.github/workflows/update-on-merge.yaml
@@ -33,10 +33,10 @@ jobs:
- name: Check out our repo
uses: actions/checkout@v7.0.1
- - name: Setup .NET 10.0
+ - name: Setup .NET 11.0
uses: actions/setup-dotnet@v6
with:
- dotnet-version: 10.0.x
+ dotnet-version: 11.0.x
- name: Set up JDK 15
uses: actions/setup-java@v6
diff --git a/.github/workflows/word-converter.yaml b/.github/workflows/word-converter.yaml
index 767c879b9..b7e2a00ce 100644
--- a/.github/workflows/word-converter.yaml
+++ b/.github/workflows/word-converter.yaml
@@ -27,10 +27,10 @@ jobs:
- name: Check out our repo
uses: actions/checkout@v7.0.1
- - name: Setup .NET 10.0
+ - name: Setup .NET 11.0
uses: actions/setup-dotnet@v6
with:
- dotnet-version: 10.0.x
+ dotnet-version: 11.0.x
- name: Run converter
env:
diff --git a/tools/ExampleExtractor/ExampleExtractor.csproj b/tools/ExampleExtractor/ExampleExtractor.csproj
index 6c67c2fd4..2aabbd678 100644
--- a/tools/ExampleExtractor/ExampleExtractor.csproj
+++ b/tools/ExampleExtractor/ExampleExtractor.csproj
@@ -2,7 +2,7 @@
Exe
- net10.0
+ net11.0
enable
enable
diff --git a/tools/ExampleFormatter/ExampleFormatter.csproj b/tools/ExampleFormatter/ExampleFormatter.csproj
index 64166ee03..a5d78091e 100644
--- a/tools/ExampleFormatter/ExampleFormatter.csproj
+++ b/tools/ExampleFormatter/ExampleFormatter.csproj
@@ -2,7 +2,7 @@
Exe
- net10.0
+ net11.0
enable
enable
diff --git a/tools/ExampleTester.Tests/ExampleTester.Tests.csproj b/tools/ExampleTester.Tests/ExampleTester.Tests.csproj
index 3fd045fb7..1c945418e 100644
--- a/tools/ExampleTester.Tests/ExampleTester.Tests.csproj
+++ b/tools/ExampleTester.Tests/ExampleTester.Tests.csproj
@@ -1,7 +1,7 @@
- net10.0
+ net11.0
enable
enable
diff --git a/tools/ExampleTester.Tests/FastCsprojCompilationParserTests.cs b/tools/ExampleTester.Tests/FastCsprojCompilationParserTests.cs
index 936e7370c..b5fad4c35 100644
--- a/tools/ExampleTester.Tests/FastCsprojCompilationParserTests.cs
+++ b/tools/ExampleTester.Tests/FastCsprojCompilationParserTests.cs
@@ -107,9 +107,10 @@ private static void CompareMSBuildWorkspaceCompilation(string csprojContents, Cs
result.CompilationOptions.Equals(sanitizedCompilationOptions).ShouldBeTrue();
- var sanitizedParseOptions = msbuildCompilation.SyntaxTrees.First().Options;
+ var sanitizedParseOptions = msbuildCompilation.SyntaxTrees.First().Options as CSharpParseOptions;
- sanitizedParseOptions = sanitizedParseOptions.WithFeatures(result.ParseOptions.Features);
+ sanitizedParseOptions = sanitizedParseOptions?.WithFeatures(result.ParseOptions.Features)
+ .WithPreprocessorSymbols(result.ParseOptions.PreprocessorSymbolNames);
result.ParseOptions.Equals(sanitizedParseOptions).ShouldBeTrue();
var sanitizedSyntaxTrees = msbuildCompilation.SyntaxTrees
@@ -126,7 +127,10 @@ private static void CompareMSBuildWorkspaceCompilation(string csprojContents, Cs
{
var sanitizedGenerated = msbuildGenerated.WithRootAndOptions(
msbuildGenerated.GetRoot(),
- ((CSharpParseOptions)msbuildGenerated.Options).WithFeatures(((CSharpParseOptions)fastGenerated.Options).Features));
+ ((CSharpParseOptions)msbuildGenerated.Options)
+ .WithFeatures(((CSharpParseOptions)fastGenerated.Options).Features).
+ WithPreprocessorSymbols(fastGenerated.Options.PreprocessorSymbolNames)).
+ WithChangedText(fastGenerated.GetText());
fastGenerated.Options.ShouldBe(sanitizedGenerated.Options);
fastGenerated.GetText().ToString().ShouldBe(sanitizedGenerated.GetText().ToString());
}
@@ -158,7 +162,7 @@ public static void Defaults()
- net10.0
+ net11.0
@@ -168,9 +172,9 @@ public static void Defaults()
result.CompilationOptions.NullableContextOptions.ShouldBe(NullableContextOptions.Disable);
result.AssemblyName.ShouldBe(Path.GetFileNameWithoutExtension(CsprojFileName));
result.CompilationOptions.AllowUnsafe.ShouldBeFalse();
- result.ParseOptions.LanguageVersion.ShouldBe(LanguageVersion.CSharp14); // Due to net10.0
- ((int)result.ParseOptions.LanguageVersion).ShouldBe(1400);
- result.CompilationOptions.WarningLevel.ShouldBe(10); // Due to net10.0
+ result.ParseOptions.LanguageVersion.ShouldBe(LanguageVersion.CSharp15); // Due to net11.0
+ ((int)result.ParseOptions.LanguageVersion).ShouldBe(1500);
+ result.CompilationOptions.WarningLevel.ShouldBe(11); // Due to net11.0
result.GeneratedSources.ShouldBeEmpty();
}
@@ -181,11 +185,11 @@ public static void ParsesTargetFramework()
- net10.0
+ net11.0
- """).TargetFramework.ShouldBe("net10.0");
+ """).TargetFramework.ShouldBe("net11.0");
}
[Test]
@@ -195,7 +199,7 @@ public static void ParsesOutputType([Values("Library", "Exe", "WinExe")] string
- net10.0
+ net11.0
{outputType}
@@ -215,7 +219,7 @@ public static void ParsesNullable([Values("enable", "disable", "annotations", "w
- net10.0
+ net11.0
{nullable}
@@ -236,7 +240,7 @@ public static void ParsesAssemblyName()
- net10.0
+ net11.0
Xyz
@@ -251,7 +255,7 @@ public static void ParsesAllowUnsafeBlocks([Values("true", "false")] string allo
- net10.0
+ net11.0
{allowUnsafeBlocks}
@@ -276,7 +280,7 @@ public static void ParsesImplicitUsings([Values("true", "enable", "false", "disa
- net10.0
+ net11.0
{implicitUsings}
@@ -297,7 +301,7 @@ public static void ParsesImplicitUsings([Values("true", "enable", "false", "disa
global using System.Net.Http;
global using System.Threading;
global using System.Threading.Tasks;
-
+
""");
}
else
diff --git a/tools/ExampleTester/ExampleTester.csproj b/tools/ExampleTester/ExampleTester.csproj
index bab7caec7..0dd67ce55 100644
--- a/tools/ExampleTester/ExampleTester.csproj
+++ b/tools/ExampleTester/ExampleTester.csproj
@@ -1,8 +1,8 @@
-
+
Exe
- net10.0
+ net11.0
enable
enable
false
@@ -10,12 +10,13 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/tools/ExampleTester/FastCsprojCompilationParser.cs b/tools/ExampleTester/FastCsprojCompilationParser.cs
index b4d0a15fc..c7d63f7d0 100644
--- a/tools/ExampleTester/FastCsprojCompilationParser.cs
+++ b/tools/ExampleTester/FastCsprojCompilationParser.cs
@@ -46,11 +46,13 @@ private sealed record TargetFrameworkInfo(
new("net8.0", new(Basic.Reference.Assemblies.Net80.References.All, LanguageVersion.CSharp12, DefaultWarningLevel: 8)),
new("net9.0", new(Basic.Reference.Assemblies.Net90.References.All, LanguageVersion.CSharp13, DefaultWarningLevel: 9)),
new("net10.0", new(Basic.Reference.Assemblies.Net100.References.All, LanguageVersion.CSharp14, DefaultWarningLevel: 10)),
+ new("net11.0", new(Basic.Reference.Assemblies.Net110.References.All, LanguageVersion.CSharp15, DefaultWarningLevel: 11)),
}.ToFrozenDictionary(StringComparer.OrdinalIgnoreCase);
private static readonly CSharpParseOptions DefaultParseOptions = new(preprocessorSymbols: [
- "TRACE", "RELEASE", "NET", "NET10_0", "NETCOREAPP", "NET5_0_OR_GREATER", "NET6_0_OR_GREATER",
- "NET7_0_OR_GREATER", "NET8_0_OR_GREATER", "NET9_0_OR_GREATER", "NET10_0_OR_GREATER",
+ "TRACE", "RELEASE", "NET", "NET10_0", "NET11_0", "NETCOREAPP",
+ "NET5_0_OR_GREATER", "NET6_0_OR_GREATER", "NET7_0_OR_GREATER", "NET8_0_OR_GREATER",
+ "NET9_0_OR_GREATER", "NET10_0_OR_GREATER", "NET11_0_OR_GREATER",
"NETCOREAPP1_0_OR_GREATER", "NETCOREAPP1_1_OR_GREATER", "NETCOREAPP2_0_OR_GREATER",
"NETCOREAPP2_1_OR_GREATER", "NETCOREAPP2_2_OR_GREATER", "NETCOREAPP3_0_OR_GREATER",
"NETCOREAPP3_1_OR_GREATER"]);
diff --git a/tools/MarkdownConverter.Tests/MarkdownConverter.Tests.csproj b/tools/MarkdownConverter.Tests/MarkdownConverter.Tests.csproj
index 508a0c0c5..51b1d08d9 100644
--- a/tools/MarkdownConverter.Tests/MarkdownConverter.Tests.csproj
+++ b/tools/MarkdownConverter.Tests/MarkdownConverter.Tests.csproj
@@ -1,7 +1,7 @@
-
+
- net10.0
+ net11.0
enable
enable
false
diff --git a/tools/MarkdownConverter/MarkdownConverter.csproj b/tools/MarkdownConverter/MarkdownConverter.csproj
index a1964151d..57b0c7886 100644
--- a/tools/MarkdownConverter/MarkdownConverter.csproj
+++ b/tools/MarkdownConverter/MarkdownConverter.csproj
@@ -2,7 +2,7 @@
Exe
- net10.0
+ net11.0
enable
enable
NU1701
@@ -11,9 +11,9 @@
-
-
-
+
+
+
diff --git a/tools/StandardAnchorTags.Tests/StandardAnchorTags.Tests.csproj b/tools/StandardAnchorTags.Tests/StandardAnchorTags.Tests.csproj
index e56792155..795340093 100644
--- a/tools/StandardAnchorTags.Tests/StandardAnchorTags.Tests.csproj
+++ b/tools/StandardAnchorTags.Tests/StandardAnchorTags.Tests.csproj
@@ -1,7 +1,7 @@
- net10.0
+ net11.0
enable
enable
diff --git a/tools/StandardAnchorTags/StandardAnchorTags.csproj b/tools/StandardAnchorTags/StandardAnchorTags.csproj
index 7eb32e158..65f753639 100644
--- a/tools/StandardAnchorTags/StandardAnchorTags.csproj
+++ b/tools/StandardAnchorTags/StandardAnchorTags.csproj
@@ -2,7 +2,7 @@
Exe
- net10.0
+ net11.0
enable
enable
diff --git a/tools/Utilities.Tests/Utilities.Tests.csproj b/tools/Utilities.Tests/Utilities.Tests.csproj
index 909a6e1b6..6650740bc 100644
--- a/tools/Utilities.Tests/Utilities.Tests.csproj
+++ b/tools/Utilities.Tests/Utilities.Tests.csproj
@@ -1,7 +1,7 @@
- net10.0
+ net11.0
enable
enable
diff --git a/tools/Utilities/Utilities.csproj b/tools/Utilities/Utilities.csproj
index 574fd96c7..ccb69b879 100644
--- a/tools/Utilities/Utilities.csproj
+++ b/tools/Utilities/Utilities.csproj
@@ -1,7 +1,7 @@
- net10.0
+ net11.0
enable
enable