From 9b3c1a7333bdff3f0d558d50c0bb3f83a2b8aaa3 Mon Sep 17 00:00:00 2001 From: dotnet-sb-bot Date: Tue, 7 Jan 2025 15:24:14 +0000 Subject: [PATCH 01/19] Re-Bootstrap Source Build to .NET 10.0.100-alpha.1.25057.1 --- src/SourceBuild/content/eng/Version.Details.xml | 4 ++-- src/SourceBuild/content/eng/Versions.props | 4 ++-- src/SourceBuild/content/global.json | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/SourceBuild/content/eng/Version.Details.xml b/src/SourceBuild/content/eng/Version.Details.xml index 876705d94e26..b9d93fc94779 100644 --- a/src/SourceBuild/content/eng/Version.Details.xml +++ b/src/SourceBuild/content/eng/Version.Details.xml @@ -2,9 +2,9 @@ - + https://github.com/dotnet/arcade - 45d845e04c05fbe5da9838c454bbc3af1df6be81 + e58820063a8754d418518bce69ca2df0e3b4ac25 diff --git a/src/SourceBuild/content/eng/Versions.props b/src/SourceBuild/content/eng/Versions.props index cc57fe707fc6..b6a507c5f5ec 100644 --- a/src/SourceBuild/content/eng/Versions.props +++ b/src/SourceBuild/content/eng/Versions.props @@ -23,8 +23,8 @@ of a .NET major or minor release, prebuilts may be needed. When the release is mature, prebuilts are not necessary, and this property is removed from the file. --> - 10.0.100-alpha.1.24612.1 - 10.0.100-alpha.1.24612.1-2 + 10.0.100-alpha.1.25057.1 + 10.0.100-alpha.1.25057.1 0.1.0-10.0.100-7 2.0.0-beta4.24126.1 diff --git a/src/SourceBuild/content/global.json b/src/SourceBuild/content/global.json index 86ca740c5b0e..ae06a19bb0da 100644 --- a/src/SourceBuild/content/global.json +++ b/src/SourceBuild/content/global.json @@ -1,10 +1,10 @@ { "tools": { - "dotnet": "10.0.100-alpha.1.24611.6" + "dotnet": "10.0.100-alpha.1.25056.8" }, "msbuild-sdks": { "Microsoft.Build.NoTargets": "3.7.0", "Microsoft.Build.Traversal": "3.4.0", - "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.24604.4" + "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25056.1" } } From 669c7dc82be344f0c7d0a514cfece8b50ad6d97e Mon Sep 17 00:00:00 2001 From: Matt Thalman Date: Tue, 7 Jan 2025 10:24:28 -0600 Subject: [PATCH 02/19] Update artifacts tarball version References a custom tarball with Microsoft.NETCore.App.Ref.9.0.0 SBRP removed --- src/SourceBuild/content/eng/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SourceBuild/content/eng/Versions.props b/src/SourceBuild/content/eng/Versions.props index b6a507c5f5ec..c15248d8bb6f 100644 --- a/src/SourceBuild/content/eng/Versions.props +++ b/src/SourceBuild/content/eng/Versions.props @@ -24,7 +24,7 @@ are not necessary, and this property is removed from the file. --> 10.0.100-alpha.1.25057.1 - 10.0.100-alpha.1.25057.1 + 10.0.100-alpha.1.25057.1-2 0.1.0-10.0.100-7 2.0.0-beta4.24126.1 From 8b87829b8740093cad2109a92784f58cff19ecc5 Mon Sep 17 00:00:00 2001 From: Matt Thalman Date: Tue, 7 Jan 2025 13:44:33 -0600 Subject: [PATCH 03/19] nuget-client patch --- ...01-Fix-formatting-in-GraphOperations.patch | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/SourceBuild/patches/nuget-client/0001-Fix-formatting-in-GraphOperations.patch diff --git a/src/SourceBuild/patches/nuget-client/0001-Fix-formatting-in-GraphOperations.patch b/src/SourceBuild/patches/nuget-client/0001-Fix-formatting-in-GraphOperations.patch new file mode 100644 index 000000000000..d0fc3df85cad --- /dev/null +++ b/src/SourceBuild/patches/nuget-client/0001-Fix-formatting-in-GraphOperations.patch @@ -0,0 +1,23 @@ +From 4172c85f6765aced2483ba6342df3b82ccc1b666 Mon Sep 17 00:00:00 2001 +From: Matt Thalman +Date: Tue, 7 Jan 2025 13:39:07 -0600 +Subject: [PATCH] Fix formatting in GraphOperations + +Backport: https://github.com/NuGet/NuGet.Client/pull/6212 +--- + .../NuGet.DependencyResolver.Core/GraphModel/GraphOperations.cs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/NuGet.Core/NuGet.DependencyResolver.Core/GraphModel/GraphOperations.cs b/src/NuGet.Core/NuGet.DependencyResolver.Core/GraphModel/GraphOperations.cs +index cd5341edb..57f73ae6c 100644 +--- a/src/NuGet.Core/NuGet.DependencyResolver.Core/GraphModel/GraphOperations.cs ++++ b/src/NuGet.Core/NuGet.DependencyResolver.Core/GraphModel/GraphOperations.cs +@@ -872,7 +872,7 @@ private static void DetectAndMarkAmbiguousCentralTransitiveDependencies(T + // Some node were marked ambiguous, thus we need another run to check if nodes previously not marked ambiguous should be marked ambiguous this time. + if (!nodeMarkedAmbiguous) + break; +- }; ++ } + } + + private static void RejectCentralTransitiveBecauseOfRejectedParents(this GraphNode root, Tracker tracker, List> centralTransitiveNodes) From f600373738b524cb74cdfaf44395005e749b87d8 Mon Sep 17 00:00:00 2001 From: Matt Thalman Date: Tue, 7 Jan 2025 14:58:51 -0600 Subject: [PATCH 04/19] razor patch --- .../razor/0001-Remove-unused-fields.patch | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src/SourceBuild/patches/razor/0001-Remove-unused-fields.patch diff --git a/src/SourceBuild/patches/razor/0001-Remove-unused-fields.patch b/src/SourceBuild/patches/razor/0001-Remove-unused-fields.patch new file mode 100644 index 000000000000..6c0d287eb2b5 --- /dev/null +++ b/src/SourceBuild/patches/razor/0001-Remove-unused-fields.patch @@ -0,0 +1,44 @@ +From beddab7e3e7d299c4b08d9f1fece97fb29acac17 Mon Sep 17 00:00:00 2001 +From: Matt Thalman +Date: Tue, 7 Jan 2025 14:48:06 -0600 +Subject: [PATCH] Remove unused fields + +Backport: https://github.com/dotnet/razor/pull/11358 +--- + .../Microsoft.AspNetCore.Razor.LanguageServer/LspServices.cs | 4 ---- + .../AutoInsert/RemoteAutoInsertService.cs | 1 - + 2 files changed, 5 deletions(-) + +diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/LspServices.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/LspServices.cs +index 43a17a0402..27a35007e3 100644 +--- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/LspServices.cs ++++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/LspServices.cs +@@ -14,16 +14,12 @@ namespace Microsoft.AspNetCore.Razor.LanguageServer; + internal class LspServices : ILspServices + { + private readonly IServiceProvider _serviceProvider; +- private readonly IEnumerable _startupServices; + public bool IsDisposed = false; + + public LspServices(IServiceCollection serviceCollection) + { + serviceCollection.AddSingleton(this); + _serviceProvider = serviceCollection.BuildServiceProvider(); +- +- // Create all startup services +- _startupServices = _serviceProvider.GetServices(); + } + + public ImmutableArray GetRegisteredServices() +diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/AutoInsert/RemoteAutoInsertService.cs b/src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/AutoInsert/RemoteAutoInsertService.cs +index 27dcc78952..f8ab749b66 100644 +--- a/src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/AutoInsert/RemoteAutoInsertService.cs ++++ b/src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/AutoInsert/RemoteAutoInsertService.cs +@@ -32,7 +32,6 @@ internal sealed class RemoteAutoInsertService(in ServiceArgs args) + } + + private readonly IAutoInsertService _autoInsertService = args.ExportProvider.GetExportedValue(); +- private readonly IFilePathService _filePathService = args.ExportProvider.GetExportedValue(); + private readonly IRazorFormattingService _razorFormattingService = args.ExportProvider.GetExportedValue(); + + protected override IDocumentPositionInfoStrategy DocumentPositionInfoStrategy => PreferHtmlInAttributeValuesDocumentPositionInfoStrategy.Instance; From ea32b67ec6b78cb3948ead6880205ebb23b3697d Mon Sep 17 00:00:00 2001 From: Matt Thalman Date: Tue, 7 Jan 2025 14:58:57 -0600 Subject: [PATCH 05/19] vstest patch --- .../0001-Fix-formatting-in-Runner.patch | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/SourceBuild/patches/vstest/0001-Fix-formatting-in-Runner.patch diff --git a/src/SourceBuild/patches/vstest/0001-Fix-formatting-in-Runner.patch b/src/SourceBuild/patches/vstest/0001-Fix-formatting-in-Runner.patch new file mode 100644 index 000000000000..78c2550ac4b4 --- /dev/null +++ b/src/SourceBuild/patches/vstest/0001-Fix-formatting-in-Runner.patch @@ -0,0 +1,23 @@ +From 4b3395b9d8de274f74d2540fca406944f8d0b0f3 Mon Sep 17 00:00:00 2001 +From: Matt Thalman +Date: Tue, 7 Jan 2025 14:50:28 -0600 +Subject: [PATCH] Fix formatting in Runner + +Backport: https://github.com/microsoft/vstest/pull/13871 +--- + test/Intent/Runner.cs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/Intent/Runner.cs b/test/Intent/Runner.cs +index cbe7706cb..fad005b98 100644 +--- a/test/Intent/Runner.cs ++++ b/test/Intent/Runner.cs +@@ -68,7 +68,7 @@ public class Runner + // When the result is a task we need to await it. + // TODO: this can be improved with await, imho + task.GetAwaiter().GetResult(); +- }; ++ } + + passed++; + logger.WriteTestPassed(method, testStopwatch.Elapsed); From dbe6f511e107ff619e534cd8c250278b32eac797 Mon Sep 17 00:00:00 2001 From: Matt Thalman Date: Tue, 7 Jan 2025 15:25:43 -0600 Subject: [PATCH 06/19] update razor patch --- .../patches/razor/0001-Remove-unused-fields.patch | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/SourceBuild/patches/razor/0001-Remove-unused-fields.patch b/src/SourceBuild/patches/razor/0001-Remove-unused-fields.patch index 6c0d287eb2b5..e710243f76d6 100644 --- a/src/SourceBuild/patches/razor/0001-Remove-unused-fields.patch +++ b/src/SourceBuild/patches/razor/0001-Remove-unused-fields.patch @@ -1,19 +1,19 @@ -From beddab7e3e7d299c4b08d9f1fece97fb29acac17 Mon Sep 17 00:00:00 2001 +From faa695199c8b8886c0d923f25a57c9728afeafbf Mon Sep 17 00:00:00 2001 From: Matt Thalman Date: Tue, 7 Jan 2025 14:48:06 -0600 Subject: [PATCH] Remove unused fields Backport: https://github.com/dotnet/razor/pull/11358 --- - .../Microsoft.AspNetCore.Razor.LanguageServer/LspServices.cs | 4 ---- + .../Microsoft.AspNetCore.Razor.LanguageServer/LspServices.cs | 4 +--- .../AutoInsert/RemoteAutoInsertService.cs | 1 - - 2 files changed, 5 deletions(-) + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/LspServices.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/LspServices.cs -index 43a17a0402..27a35007e3 100644 +index 43a17a0402..01bf4ada70 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/LspServices.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/LspServices.cs -@@ -14,16 +14,12 @@ namespace Microsoft.AspNetCore.Razor.LanguageServer; +@@ -14,16 +14,14 @@ namespace Microsoft.AspNetCore.Razor.LanguageServer; internal class LspServices : ILspServices { private readonly IServiceProvider _serviceProvider; @@ -25,8 +25,9 @@ index 43a17a0402..27a35007e3 100644 serviceCollection.AddSingleton(this); _serviceProvider = serviceCollection.BuildServiceProvider(); - -- // Create all startup services + // Create all startup services - _startupServices = _serviceProvider.GetServices(); ++ _serviceProvider.GetServices(); } public ImmutableArray GetRegisteredServices() From e1eccdfb66bbc4085e22e04745745d714219b2e5 Mon Sep 17 00:00:00 2001 From: Matt Thalman Date: Tue, 7 Jan 2025 18:31:12 -0600 Subject: [PATCH 07/19] another razor patch --- ...ld-in-RazorContentTypeChangeListener.patch | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 src/SourceBuild/patches/razor/0002-Remove-unused-field-in-RazorContentTypeChangeListener.patch diff --git a/src/SourceBuild/patches/razor/0002-Remove-unused-field-in-RazorContentTypeChangeListener.patch b/src/SourceBuild/patches/razor/0002-Remove-unused-field-in-RazorContentTypeChangeListener.patch new file mode 100644 index 000000000000..8c7dcd117401 --- /dev/null +++ b/src/SourceBuild/patches/razor/0002-Remove-unused-field-in-RazorContentTypeChangeListener.patch @@ -0,0 +1,63 @@ +From 1d6f0ce17c97fcf541b5f45b000b4f54356e8f25 Mon Sep 17 00:00:00 2001 +From: Matt Thalman +Date: Tue, 7 Jan 2025 18:28:41 -0600 +Subject: [PATCH] Remove unused field in RazorContentTypeChangeListener + +Backport: https://github.com/dotnet/razor/pull/11361 +--- + .../LanguageClient/RazorContentTypeChangeListener.cs | 8 -------- + .../LanguageClient/RazorContentTypeChangeListenerTest.cs | 1 - + 2 files changed, 9 deletions(-) + +diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/RazorContentTypeChangeListener.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/RazorContentTypeChangeListener.cs +index dcc90c5787..13fb4b0696 100644 +--- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/RazorContentTypeChangeListener.cs ++++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/RazorContentTypeChangeListener.cs +@@ -18,7 +18,6 @@ internal class RazorContentTypeChangeListener : ITextBufferContentTypeListener + private readonly TrackingLSPDocumentManager _lspDocumentManager; + private readonly ITextDocumentFactoryService _textDocumentFactory; + private readonly ILspEditorFeatureDetector _lspEditorFeatureDetector; +- private readonly IEditorOptionsFactoryService _editorOptionsFactory; + private readonly IFileToContentTypeService _fileToContentTypeService; + + [ImportingConstructor] +@@ -26,7 +25,6 @@ internal class RazorContentTypeChangeListener : ITextBufferContentTypeListener + ITextDocumentFactoryService textDocumentFactory, + LSPDocumentManager lspDocumentManager, + ILspEditorFeatureDetector lspEditorFeatureDetector, +- IEditorOptionsFactoryService editorOptionsFactory, + IFileToContentTypeService fileToContentTypeService) + { + if (textDocumentFactory is null) +@@ -44,11 +42,6 @@ internal class RazorContentTypeChangeListener : ITextBufferContentTypeListener + throw new ArgumentNullException(nameof(lspEditorFeatureDetector)); + } + +- if (editorOptionsFactory is null) +- { +- throw new ArgumentNullException(nameof(editorOptionsFactory)); +- } +- + if (fileToContentTypeService is null) + { + throw new ArgumentNullException(nameof(fileToContentTypeService)); +@@ -63,7 +56,6 @@ internal class RazorContentTypeChangeListener : ITextBufferContentTypeListener + + _textDocumentFactory = textDocumentFactory; + _lspEditorFeatureDetector = lspEditorFeatureDetector; +- _editorOptionsFactory = editorOptionsFactory; + _fileToContentTypeService = fileToContentTypeService; + } + +diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/RazorContentTypeChangeListenerTest.cs b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/RazorContentTypeChangeListenerTest.cs +index d01ea46d5c..d6afae6491 100644 +--- a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/RazorContentTypeChangeListenerTest.cs ++++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LanguageClient/RazorContentTypeChangeListenerTest.cs +@@ -226,7 +226,6 @@ public class RazorContentTypeChangeListenerTest : ToolingTestBase + textDocumentFactory, + lspDocumentManager, + lspEditorFeatureDetector, +- Mock.Of(s => s.GetOptions(It.IsAny()) == Mock.Of(MockBehavior.Strict), MockBehavior.Strict), + fileToContentTypeService); + + return listener; From 57b292b878176233c4ba587378f46764b16e0ebe Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Wed, 8 Jan 2025 13:50:17 +0100 Subject: [PATCH 08/19] Add one more razor patch --- .../razor/0003-Remove-unnecessary-using.patch | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/SourceBuild/patches/razor/0003-Remove-unnecessary-using.patch diff --git a/src/SourceBuild/patches/razor/0003-Remove-unnecessary-using.patch b/src/SourceBuild/patches/razor/0003-Remove-unnecessary-using.patch new file mode 100644 index 000000000000..e87ca4024166 --- /dev/null +++ b/src/SourceBuild/patches/razor/0003-Remove-unnecessary-using.patch @@ -0,0 +1,23 @@ +From fa8b9938dfaa72c790a1bf4a657af77ef2de5f13 Mon Sep 17 00:00:00 2001 +From: David Wengier +Date: Wed, 8 Jan 2025 12:03:12 +1100 +Subject: [PATCH] Remove using + +Backport: https://github.com/dotnet/razor/pull/11361 + +--- + .../LanguageClient/RazorContentTypeChangeListener.cs | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/RazorContentTypeChangeListener.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/RazorContentTypeChangeListener.cs +index 13fb4b06969..535223227b5 100644 +--- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/RazorContentTypeChangeListener.cs ++++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/RazorContentTypeChangeListener.cs +@@ -5,7 +5,6 @@ + using System.ComponentModel.Composition; + using Microsoft.VisualStudio.LanguageServer.ContainedLanguage; + using Microsoft.VisualStudio.Text; +-using Microsoft.VisualStudio.Text.Editor; + using Microsoft.VisualStudio.Utilities; + + namespace Microsoft.VisualStudio.Razor.LanguageClient; \ No newline at end of file From 917ffa71767a99c2526289b2cfebeada758c3e97 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Wed, 8 Jan 2025 14:05:44 +0100 Subject: [PATCH 09/19] Fix patch (hopefully) --- .../patches/razor/0003-Remove-unnecessary-using.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SourceBuild/patches/razor/0003-Remove-unnecessary-using.patch b/src/SourceBuild/patches/razor/0003-Remove-unnecessary-using.patch index e87ca4024166..082b54a3689a 100644 --- a/src/SourceBuild/patches/razor/0003-Remove-unnecessary-using.patch +++ b/src/SourceBuild/patches/razor/0003-Remove-unnecessary-using.patch @@ -10,10 +10,10 @@ Backport: https://github.com/dotnet/razor/pull/11361 1 file changed, 1 deletion(-) diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/RazorContentTypeChangeListener.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/RazorContentTypeChangeListener.cs -index 13fb4b06969..535223227b5 100644 +index 13fb4b0696..535223227b 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/RazorContentTypeChangeListener.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/RazorContentTypeChangeListener.cs -@@ -5,7 +5,6 @@ +@@ -5,7 +5,6 @@ using System; using System.ComponentModel.Composition; using Microsoft.VisualStudio.LanguageServer.ContainedLanguage; using Microsoft.VisualStudio.Text; From bb219da5989c846ff6cd56d5ad3c242de76e5d2d Mon Sep 17 00:00:00 2001 From: Matt Thalman Date: Wed, 8 Jan 2025 07:53:40 -0600 Subject: [PATCH 10/19] Fix razor patch --- .../patches/razor/0003-Remove-unnecessary-using.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SourceBuild/patches/razor/0003-Remove-unnecessary-using.patch b/src/SourceBuild/patches/razor/0003-Remove-unnecessary-using.patch index 082b54a3689a..2ad84ab1351c 100644 --- a/src/SourceBuild/patches/razor/0003-Remove-unnecessary-using.patch +++ b/src/SourceBuild/patches/razor/0003-Remove-unnecessary-using.patch @@ -20,4 +20,4 @@ index 13fb4b0696..535223227b 100644 -using Microsoft.VisualStudio.Text.Editor; using Microsoft.VisualStudio.Utilities; - namespace Microsoft.VisualStudio.Razor.LanguageClient; \ No newline at end of file + namespace Microsoft.VisualStudio.Razor.LanguageClient; From e460e2d955f9ef9c66e4573d99827f9bdbe6c955 Mon Sep 17 00:00:00 2001 From: Matt Thalman Date: Wed, 8 Jan 2025 07:53:49 -0600 Subject: [PATCH 11/19] Add winforms patch --- .../0001-Fix-code-analysis-issues.patch | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/SourceBuild/patches/winforms/0001-Fix-code-analysis-issues.patch diff --git a/src/SourceBuild/patches/winforms/0001-Fix-code-analysis-issues.patch b/src/SourceBuild/patches/winforms/0001-Fix-code-analysis-issues.patch new file mode 100644 index 000000000000..105f6b22e9cc --- /dev/null +++ b/src/SourceBuild/patches/winforms/0001-Fix-code-analysis-issues.patch @@ -0,0 +1,35 @@ +From fc1c96573ef2767614466dd78f35e5f34eef775c Mon Sep 17 00:00:00 2001 +From: Matt Thalman +Date: Wed, 8 Jan 2025 07:20:08 -0600 +Subject: [PATCH] Fix code analysis issues + +Backport: TODO +--- + .../src/System/Collections/Generic/CollectionExtensions.cs | 2 +- + src/System.Private.Windows.GdiPlus/System/Drawing/IIcon.cs | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/System.Private.Windows.Core/src/System/Collections/Generic/CollectionExtensions.cs b/src/System.Private.Windows.Core/src/System/Collections/Generic/CollectionExtensions.cs +index 15dd20bbf..eb0852ff0 100644 +--- a/src/System.Private.Windows.Core/src/System/Collections/Generic/CollectionExtensions.cs ++++ b/src/System.Private.Windows.Core/src/System/Collections/Generic/CollectionExtensions.cs +@@ -25,7 +25,7 @@ internal static class CollectionExtensions + } + + // Fall back to just setting the count (by removing). +- List list = new(readOnlyList); ++ List list = [..readOnlyList]; + list.RemoveRange(count, list.Count - count); + return list; + } +diff --git a/src/System.Private.Windows.GdiPlus/System/Drawing/IIcon.cs b/src/System.Private.Windows.GdiPlus/System/Drawing/IIcon.cs +index 7b53bdaf0..5eed2338f 100644 +--- a/src/System.Private.Windows.GdiPlus/System/Drawing/IIcon.cs ++++ b/src/System.Private.Windows.GdiPlus/System/Drawing/IIcon.cs +@@ -5,5 +5,5 @@ namespace System.Drawing; + + internal interface IIcon : IHandle + { +- public Size Size { get; } ++ Size Size { get; } + } From f23ee44012f75750faa118ec7b07f349cf382fa4 Mon Sep 17 00:00:00 2001 From: Matt Thalman Date: Wed, 8 Jan 2025 10:19:53 -0600 Subject: [PATCH 12/19] update winforms patch --- .../0001-Fix-code-analysis-issues.patch | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/SourceBuild/patches/winforms/0001-Fix-code-analysis-issues.patch b/src/SourceBuild/patches/winforms/0001-Fix-code-analysis-issues.patch index 105f6b22e9cc..ea1921ccf0d7 100644 --- a/src/SourceBuild/patches/winforms/0001-Fix-code-analysis-issues.patch +++ b/src/SourceBuild/patches/winforms/0001-Fix-code-analysis-issues.patch @@ -1,14 +1,28 @@ -From fc1c96573ef2767614466dd78f35e5f34eef775c Mon Sep 17 00:00:00 2001 +From 6524a92048350453584b60d53d22778143393319 Mon Sep 17 00:00:00 2001 From: Matt Thalman Date: Wed, 8 Jan 2025 07:20:08 -0600 Subject: [PATCH] Fix code analysis issues Backport: TODO --- + .../System/Drawing/Printing/PrinterSettings.StringCollection.cs | 2 +- .../src/System/Collections/Generic/CollectionExtensions.cs | 2 +- src/System.Private.Windows.GdiPlus/System/Drawing/IIcon.cs | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + 3 files changed, 3 insertions(+), 3 deletions(-) +diff --git a/src/System.Drawing.Common/src/System/Drawing/Printing/PrinterSettings.StringCollection.cs b/src/System.Drawing.Common/src/System/Drawing/Printing/PrinterSettings.StringCollection.cs +index 15dc585aa..d063cdd21 100644 +--- a/src/System.Drawing.Common/src/System/Drawing/Printing/PrinterSettings.StringCollection.cs ++++ b/src/System.Drawing.Common/src/System/Drawing/Printing/PrinterSettings.StringCollection.cs +@@ -15,7 +15,7 @@ public partial class PrinterSettings + /// + /// Initializes a new instance of the class. + /// +- public StringCollection(string[] array) => _list = new(array); ++ public StringCollection(string[] array) => _list = [..array]; + + /// + /// Gets a value indicating the number of strings. diff --git a/src/System.Private.Windows.Core/src/System/Collections/Generic/CollectionExtensions.cs b/src/System.Private.Windows.Core/src/System/Collections/Generic/CollectionExtensions.cs index 15dd20bbf..eb0852ff0 100644 --- a/src/System.Private.Windows.Core/src/System/Collections/Generic/CollectionExtensions.cs From 802d0b92d8929d1d169c86c00b95e15d9d89d5e9 Mon Sep 17 00:00:00 2001 From: Matt Thalman Date: Wed, 8 Jan 2025 12:27:50 -0600 Subject: [PATCH 13/19] update winforms patch --- .../0001-Fix-code-analysis-issues.patch | 118 +++++++++++++++++- 1 file changed, 113 insertions(+), 5 deletions(-) diff --git a/src/SourceBuild/patches/winforms/0001-Fix-code-analysis-issues.patch b/src/SourceBuild/patches/winforms/0001-Fix-code-analysis-issues.patch index ea1921ccf0d7..76e799ea9254 100644 --- a/src/SourceBuild/patches/winforms/0001-Fix-code-analysis-issues.patch +++ b/src/SourceBuild/patches/winforms/0001-Fix-code-analysis-issues.patch @@ -1,14 +1,21 @@ -From 6524a92048350453584b60d53d22778143393319 Mon Sep 17 00:00:00 2001 +From 4c00486cbca37b9640d9243c2e83e598ced2976b Mon Sep 17 00:00:00 2001 From: Matt Thalman Date: Wed, 8 Jan 2025 07:20:08 -0600 Subject: [PATCH] Fix code analysis issues Backport: TODO --- - .../System/Drawing/Printing/PrinterSettings.StringCollection.cs | 2 +- - .../src/System/Collections/Generic/CollectionExtensions.cs | 2 +- - src/System.Private.Windows.GdiPlus/System/Drawing/IIcon.cs | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) + .../Drawing/Printing/PrinterSettings.StringCollection.cs | 2 +- + .../src/System/Collections/Generic/CollectionExtensions.cs | 2 +- + src/System.Private.Windows.GdiPlus/System/Drawing/IIcon.cs | 2 +- + .../Windows/Forms/ActiveX/AxHost.AxPropertyDescriptor.cs | 2 +- + .../ComponentModel/COM2Interop/COM2PropertyDescriptor.cs | 2 +- + .../COM2Interop/ICom2ExtendedBrowsingHandler.cs | 4 ++-- + .../src/System/Windows/Forms/Controls/ComboBox/ComboBox.cs | 2 +- + .../System/Windows/Forms/Controls/ToolStrips/ToolStrip.cs | 2 +- + .../Windows/Forms/Controls/ToolStrips/ToolStripDropDown.cs | 2 +- + .../Windows/Forms/Dialogs/TaskDialog/TaskDialogPage.cs | 6 +++--- + 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/System.Drawing.Common/src/System/Drawing/Printing/PrinterSettings.StringCollection.cs b/src/System.Drawing.Common/src/System/Drawing/Printing/PrinterSettings.StringCollection.cs index 15dc585aa..d063cdd21 100644 @@ -47,3 +54,104 @@ index 7b53bdaf0..5eed2338f 100644 - public Size Size { get; } + Size Size { get; } } +diff --git a/src/System.Windows.Forms/src/System/Windows/Forms/ActiveX/AxHost.AxPropertyDescriptor.cs b/src/System.Windows.Forms/src/System/Windows/Forms/ActiveX/AxHost.AxPropertyDescriptor.cs +index 0d60dda12..d66e015cd 100644 +--- a/src/System.Windows.Forms/src/System/Windows/Forms/ActiveX/AxHost.AxPropertyDescriptor.cs ++++ b/src/System.Windows.Forms/src/System/Windows/Forms/ActiveX/AxHost.AxPropertyDescriptor.cs +@@ -254,7 +254,7 @@ public abstract partial class AxHost + return; + } + +- List attributes = new(AttributeArray!); ++ List attributes = [..AttributeArray!]; + attributes.AddRange(_updateAttributes); + AttributeArray = [.. attributes]; + _updateAttributes.Clear(); +diff --git a/src/System.Windows.Forms/src/System/Windows/Forms/ComponentModel/COM2Interop/COM2PropertyDescriptor.cs b/src/System.Windows.Forms/src/System/Windows/Forms/ComponentModel/COM2Interop/COM2PropertyDescriptor.cs +index 33dd3d9e8..53a8148a3 100644 +--- a/src/System.Windows.Forms/src/System/Windows/Forms/ComponentModel/COM2Interop/COM2PropertyDescriptor.cs ++++ b/src/System.Windows.Forms/src/System/Windows/Forms/ComponentModel/COM2Interop/COM2PropertyDescriptor.cs +@@ -238,7 +238,7 @@ internal unsafe partial class Com2PropertyDescriptor : PropertyDescriptor, IClon + + if (attributeList.Count > 0) + { +- newAttributes ??= new(AttributeArray); ++ newAttributes ??= [..AttributeArray]; + + // Push any new attributes into the base type. + for (int i = 0; i < attributeList.Count; i++) +diff --git a/src/System.Windows.Forms/src/System/Windows/Forms/ComponentModel/COM2Interop/ICom2ExtendedBrowsingHandler.cs b/src/System.Windows.Forms/src/System/Windows/Forms/ComponentModel/COM2Interop/ICom2ExtendedBrowsingHandler.cs +index 291b42c5d..8fb6a7b67 100644 +--- a/src/System.Windows.Forms/src/System/Windows/Forms/ComponentModel/COM2Interop/ICom2ExtendedBrowsingHandler.cs ++++ b/src/System.Windows.Forms/src/System/Windows/Forms/ComponentModel/COM2Interop/ICom2ExtendedBrowsingHandler.cs +@@ -21,11 +21,11 @@ internal unsafe interface ICom2ExtendedBrowsingHandler + /// + /// Returns if the given object is supported by this type. + /// +- public bool ObjectSupportsInterface(object @object); ++ bool ObjectSupportsInterface(object @object); + + /// + /// Called to setup the property handlers on a given property. In this method, the handler will add listeners + /// to the events that the surfaces that it cares about. + /// +- public void RegisterEvents(Com2PropertyDescriptor[]? properties); ++ void RegisterEvents(Com2PropertyDescriptor[]? properties); + } +diff --git a/src/System.Windows.Forms/src/System/Windows/Forms/Controls/ComboBox/ComboBox.cs b/src/System.Windows.Forms/src/System/Windows/Forms/Controls/ComboBox/ComboBox.cs +index d078054db..95f65362b 100644 +--- a/src/System.Windows.Forms/src/System/Windows/Forms/Controls/ComboBox/ComboBox.cs ++++ b/src/System.Windows.Forms/src/System/Windows/Forms/Controls/ComboBox/ComboBox.cs +@@ -2052,7 +2052,7 @@ public partial class ComboBox : ListControl + else + { + // Remove one character from matching text and rematch +- MatchingText = MatchingText.Remove(MatchingText.Length - 1); ++ MatchingText = MatchingText[..^1]; + SelectedIndex = FindString(MatchingText); + } + +diff --git a/src/System.Windows.Forms/src/System/Windows/Forms/Controls/ToolStrips/ToolStrip.cs b/src/System.Windows.Forms/src/System/Windows/Forms/Controls/ToolStrips/ToolStrip.cs +index 040b4ff8e..4775f3e96 100644 +--- a/src/System.Windows.Forms/src/System/Windows/Forms/Controls/ToolStrips/ToolStrip.cs ++++ b/src/System.Windows.Forms/src/System/Windows/Forms/Controls/ToolStrips/ToolStrip.cs +@@ -3933,7 +3933,7 @@ public partial class ToolStrip : ScrollableControl, IArrangedElement, ISupportTo + /// contains ToolStrip or ToolStripDropDown items to disconnect + internal virtual void ReleaseToolStripItemsProviders(ToolStripItemCollection items) + { +- ToolStripItem[] itemsArray = items.Cast().ToArray(); ++ ToolStripItem[] itemsArray = [..items.Cast()]; + foreach (ToolStripItem toolStripItem in itemsArray) + { + if (toolStripItem is ToolStripDropDownItem dropDownItem && dropDownItem.DropDownItems.Count > 0) +diff --git a/src/System.Windows.Forms/src/System/Windows/Forms/Controls/ToolStrips/ToolStripDropDown.cs b/src/System.Windows.Forms/src/System/Windows/Forms/Controls/ToolStrips/ToolStripDropDown.cs +index 83777ba57..573607e61 100644 +--- a/src/System.Windows.Forms/src/System/Windows/Forms/Controls/ToolStrips/ToolStripDropDown.cs ++++ b/src/System.Windows.Forms/src/System/Windows/Forms/Controls/ToolStrips/ToolStripDropDown.cs +@@ -1948,7 +1948,7 @@ public partial class ToolStripDropDown : ToolStrip + } + else + { +- List dropDowns = new(ActiveDropDowns); ++ List dropDowns = [..ActiveDropDowns]; + + // We can't iterate through the active dropdown collection + // here as changing visibility changes the collection. +diff --git a/src/System.Windows.Forms/src/System/Windows/Forms/Dialogs/TaskDialog/TaskDialogPage.cs b/src/System.Windows.Forms/src/System/Windows/Forms/Dialogs/TaskDialog/TaskDialogPage.cs +index 40be8a27f..d0ce8db76 100644 +--- a/src/System.Windows.Forms/src/System/Windows/Forms/Dialogs/TaskDialog/TaskDialogPage.cs ++++ b/src/System.Windows.Forms/src/System/Windows/Forms/Dialogs/TaskDialog/TaskDialogPage.cs +@@ -868,10 +868,10 @@ public class TaskDialogPage + radioButtons.BoundPage = this; + + // Sort the buttons. +- _boundCustomButtons = buttons.Where(e => !e.IsStandardButton).ToArray(); +- _boundStandardButtonsByID = new Dictionary( ++ _boundCustomButtons = [..buttons.Where(e => !e.IsStandardButton)]; ++ _boundStandardButtonsByID = [.. + buttons.Where(e => e.IsStandardButton) +- .Select(e => new KeyValuePair(e.ButtonID, e))); ++ .Select(e => new KeyValuePair(e.ButtonID, e))]; + + // Assign IDs to the buttons based on their index. + defaultButtonID = 0; From e15d4e79fcca417a69ca3a4d18934dc8b532bbd6 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Wed, 8 Jan 2025 19:59:53 +0100 Subject: [PATCH 14/19] Update VS image to vs2022preview.scout --- eng/pipelines/templates/variables/vmr-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/templates/variables/vmr-build.yml b/eng/pipelines/templates/variables/vmr-build.yml index b689b821f8e6..6a53179a8f98 100644 --- a/eng/pipelines/templates/variables/vmr-build.yml +++ b/eng/pipelines/templates/variables/vmr-build.yml @@ -151,7 +151,7 @@ variables: - name: poolImage_Mac value: macos-13 - name: poolImage_Windows - value: windows.vs2022preview.amd64.open + value: windows.vs2022preview.scout.amd64.open - ${{ else }}: - ${{ if in(variables['Build.Reason'], 'PullRequest') }}: - name: defaultPoolName From 0a0957ef3cf86a627b694582be57733fa481dd4a Mon Sep 17 00:00:00 2001 From: Matt Thalman Date: Wed, 8 Jan 2025 16:12:16 -0600 Subject: [PATCH 15/19] update winforms patch --- .../0001-Fix-code-analysis-issues.patch | 37 ++++++++++--------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/src/SourceBuild/patches/winforms/0001-Fix-code-analysis-issues.patch b/src/SourceBuild/patches/winforms/0001-Fix-code-analysis-issues.patch index 76e799ea9254..dc735415987b 100644 --- a/src/SourceBuild/patches/winforms/0001-Fix-code-analysis-issues.patch +++ b/src/SourceBuild/patches/winforms/0001-Fix-code-analysis-issues.patch @@ -1,21 +1,21 @@ -From 4c00486cbca37b9640d9243c2e83e598ced2976b Mon Sep 17 00:00:00 2001 +From 7eb859cd771d1efe4e955b7d44a12af3667ee65f Mon Sep 17 00:00:00 2001 From: Matt Thalman Date: Wed, 8 Jan 2025 07:20:08 -0600 Subject: [PATCH] Fix code analysis issues -Backport: TODO +Backport: https://github.com/dotnet/winforms/pull/12735 --- - .../Drawing/Printing/PrinterSettings.StringCollection.cs | 2 +- - .../src/System/Collections/Generic/CollectionExtensions.cs | 2 +- - src/System.Private.Windows.GdiPlus/System/Drawing/IIcon.cs | 2 +- - .../Windows/Forms/ActiveX/AxHost.AxPropertyDescriptor.cs | 2 +- - .../ComponentModel/COM2Interop/COM2PropertyDescriptor.cs | 2 +- - .../COM2Interop/ICom2ExtendedBrowsingHandler.cs | 4 ++-- - .../src/System/Windows/Forms/Controls/ComboBox/ComboBox.cs | 2 +- - .../System/Windows/Forms/Controls/ToolStrips/ToolStrip.cs | 2 +- - .../Windows/Forms/Controls/ToolStrips/ToolStripDropDown.cs | 2 +- - .../Windows/Forms/Dialogs/TaskDialog/TaskDialogPage.cs | 6 +++--- - 10 files changed, 13 insertions(+), 13 deletions(-) + .../Drawing/Printing/PrinterSettings.StringCollection.cs | 2 +- + .../System/Collections/Generic/CollectionExtensions.cs | 2 +- + .../System/Drawing/IIcon.cs | 2 +- + .../Windows/Forms/ActiveX/AxHost.AxPropertyDescriptor.cs | 2 +- + .../ComponentModel/COM2Interop/COM2PropertyDescriptor.cs | 2 +- + .../COM2Interop/ICom2ExtendedBrowsingHandler.cs | 4 ++-- + .../System/Windows/Forms/Controls/ComboBox/ComboBox.cs | 2 +- + .../System/Windows/Forms/Controls/ToolStrips/ToolStrip.cs | 2 +- + .../Forms/Controls/ToolStrips/ToolStripDropDown.cs | 2 +- + .../Windows/Forms/Dialogs/TaskDialog/TaskDialogPage.cs | 8 ++++---- + 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/System.Drawing.Common/src/System/Drawing/Printing/PrinterSettings.StringCollection.cs b/src/System.Drawing.Common/src/System/Drawing/Printing/PrinterSettings.StringCollection.cs index 15dc585aa..d063cdd21 100644 @@ -138,7 +138,7 @@ index 83777ba57..573607e61 100644 // We can't iterate through the active dropdown collection // here as changing visibility changes the collection. diff --git a/src/System.Windows.Forms/src/System/Windows/Forms/Dialogs/TaskDialog/TaskDialogPage.cs b/src/System.Windows.Forms/src/System/Windows/Forms/Dialogs/TaskDialog/TaskDialogPage.cs -index 40be8a27f..d0ce8db76 100644 +index 40be8a27f..f8b6f7f43 100644 --- a/src/System.Windows.Forms/src/System/Windows/Forms/Dialogs/TaskDialog/TaskDialogPage.cs +++ b/src/System.Windows.Forms/src/System/Windows/Forms/Dialogs/TaskDialog/TaskDialogPage.cs @@ -868,10 +868,10 @@ public class TaskDialogPage @@ -147,11 +147,12 @@ index 40be8a27f..d0ce8db76 100644 // Sort the buttons. - _boundCustomButtons = buttons.Where(e => !e.IsStandardButton).ToArray(); - _boundStandardButtonsByID = new Dictionary( -+ _boundCustomButtons = [..buttons.Where(e => !e.IsStandardButton)]; -+ _boundStandardButtonsByID = [.. - buttons.Where(e => e.IsStandardButton) +- buttons.Where(e => e.IsStandardButton) - .Select(e => new KeyValuePair(e.ButtonID, e))); -+ .Select(e => new KeyValuePair(e.ButtonID, e))]; ++ _boundCustomButtons = [..buttons.Where(e => !e.IsStandardButton)]; ++ _boundStandardButtonsByID = buttons ++ .Where(e => e.IsStandardButton) ++ .ToDictionary(e => e.ButtonID); // Assign IDs to the buttons based on their index. defaultButtonID = 0; From 23be980bf7fc2edcf885038fd4a620cd58478e50 Mon Sep 17 00:00:00 2001 From: Matt Thalman Date: Wed, 8 Jan 2025 18:43:09 -0600 Subject: [PATCH 16/19] updates to winforms patch --- .../0001-Fix-code-analysis-issues.patch | 153 +++++++++++++++++- 1 file changed, 151 insertions(+), 2 deletions(-) diff --git a/src/SourceBuild/patches/winforms/0001-Fix-code-analysis-issues.patch b/src/SourceBuild/patches/winforms/0001-Fix-code-analysis-issues.patch index dc735415987b..00000140e9d2 100644 --- a/src/SourceBuild/patches/winforms/0001-Fix-code-analysis-issues.patch +++ b/src/SourceBuild/patches/winforms/0001-Fix-code-analysis-issues.patch @@ -1,4 +1,4 @@ -From 7eb859cd771d1efe4e955b7d44a12af3667ee65f Mon Sep 17 00:00:00 2001 +From 03549bcc6e902a551be08339490e9f13db217ad6 Mon Sep 17 00:00:00 2001 From: Matt Thalman Date: Wed, 8 Jan 2025 07:20:08 -0600 Subject: [PATCH] Fix code analysis issues @@ -8,6 +8,16 @@ Backport: https://github.com/dotnet/winforms/pull/12735 .../Drawing/Printing/PrinterSettings.StringCollection.cs | 2 +- .../System/Collections/Generic/CollectionExtensions.cs | 2 +- .../System/Drawing/IIcon.cs | 2 +- + .../CollectionEditor.CollectionEditorCollectionForm.cs | 2 +- + .../src/System/ComponentModel/Design/DesignerHost.cs | 2 +- + ...omSerializationStore.ComponentListCodeDomSerializer.cs | 2 +- + .../Windows/Forms/Design/Behavior/SelectionManager.cs | 4 ++-- + .../Forms/Design/Behavior/TableLayoutPanelBehavior.cs | 2 +- + .../Design/Behavior/ToolStripPanelSelectionBehavior.cs | 2 +- + .../src/System/Windows/Forms/Design/CommandSet.cs | 2 +- + .../Windows/Forms/Design/FlowLayoutPanelDesigner .cs | 2 +- + .../src/System/Windows/Forms/Design/OleDragDropHandler.cs | 2 +- + .../Windows/Forms/Design/TableLayoutPanelDesigner.cs | 2 +- .../Windows/Forms/ActiveX/AxHost.AxPropertyDescriptor.cs | 2 +- .../ComponentModel/COM2Interop/COM2PropertyDescriptor.cs | 2 +- .../COM2Interop/ICom2ExtendedBrowsingHandler.cs | 4 ++-- @@ -15,7 +25,7 @@ Backport: https://github.com/dotnet/winforms/pull/12735 .../System/Windows/Forms/Controls/ToolStrips/ToolStrip.cs | 2 +- .../Forms/Controls/ToolStrips/ToolStripDropDown.cs | 2 +- .../Windows/Forms/Dialogs/TaskDialog/TaskDialogPage.cs | 8 ++++---- - 10 files changed, 14 insertions(+), 14 deletions(-) + 20 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/System.Drawing.Common/src/System/Drawing/Printing/PrinterSettings.StringCollection.cs b/src/System.Drawing.Common/src/System/Drawing/Printing/PrinterSettings.StringCollection.cs index 15dc585aa..d063cdd21 100644 @@ -54,6 +64,145 @@ index 7b53bdaf0..5eed2338f 100644 - public Size Size { get; } + Size Size { get; } } +diff --git a/src/System.Windows.Forms.Design/src/System/ComponentModel/Design/CollectionEditor.CollectionEditorCollectionForm.cs b/src/System.Windows.Forms.Design/src/System/ComponentModel/Design/CollectionEditor.CollectionEditorCollectionForm.cs +index e5428772c..d30b80ffb 100644 +--- a/src/System.Windows.Forms.Design/src/System/ComponentModel/Design/CollectionEditor.CollectionEditorCollectionForm.cs ++++ b/src/System.Windows.Forms.Design/src/System/ComponentModel/Design/CollectionEditor.CollectionEditorCollectionForm.cs +@@ -807,7 +807,7 @@ public partial class CollectionEditor + { + if (_listBox.SelectedItems.Count > 1) + { +- List toBeDeleted = _listBox.SelectedItems.Cast().ToList(); ++ List toBeDeleted = [.._listBox.SelectedItems.Cast()]; + foreach (ListItem item in toBeDeleted) + { + RemoveInternal(item); +diff --git a/src/System.Windows.Forms.Design/src/System/ComponentModel/Design/DesignerHost.cs b/src/System.Windows.Forms.Design/src/System/ComponentModel/Design/DesignerHost.cs +index 0e5f01025..1260870a2 100644 +--- a/src/System.Windows.Forms.Design/src/System/ComponentModel/Design/DesignerHost.cs ++++ b/src/System.Windows.Forms.Design/src/System/ComponentModel/Design/DesignerHost.cs +@@ -1119,7 +1119,7 @@ internal sealed partial class DesignerHost : Container, IDesignerLoaderHost2, ID + _state[s_stateLoading] = true; + Unload(); + +- List errorList = errorCollection is null ? [] : errorCollection.Cast().ToList(); ++ List errorList = errorCollection is null ? [] : [..errorCollection.Cast()]; + errorList.Insert(0, ex); + + errorCollection = errorList; +diff --git a/src/System.Windows.Forms.Design/src/System/ComponentModel/Design/Serialization/CodeDomComponentSerializationService.CodeDomSerializationStore.ComponentListCodeDomSerializer.cs b/src/System.Windows.Forms.Design/src/System/ComponentModel/Design/Serialization/CodeDomComponentSerializationService.CodeDomSerializationStore.ComponentListCodeDomSerializer.cs +index 9eb2a6a71..cb2e80289 100644 +--- a/src/System.Windows.Forms.Design/src/System/ComponentModel/Design/Serialization/CodeDomComponentSerializationService.CodeDomSerializationStore.ComponentListCodeDomSerializer.cs ++++ b/src/System.Windows.Forms.Design/src/System/ComponentModel/Design/Serialization/CodeDomComponentSerializationService.CodeDomSerializationStore.ComponentListCodeDomSerializer.cs +@@ -91,7 +91,7 @@ public sealed partial class CodeDomComponentSerializationService + + // We need to also ensure that for every entry in the statement table we have a + // corresponding entry in objectNames. Otherwise, we won't deserialize completely. +- HashSet completeNames = new(objectNames); ++ HashSet completeNames = [..objectNames]; + completeNames.UnionWith(_statementsTable.Keys); + + _objectState = new(objectState); +diff --git a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/Behavior/SelectionManager.cs b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/Behavior/SelectionManager.cs +index 73648af22..23bbac7ba 100644 +--- a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/Behavior/SelectionManager.cs ++++ b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/Behavior/SelectionManager.cs +@@ -257,7 +257,7 @@ internal sealed class SelectionManager : IDisposable + /// + private void OnBeginDrag(object? source, BehaviorDragDropEventArgs e) + { +- List dragComps = e.DragComponents.Cast().ToList(); ++ List dragComps = [..e.DragComponents.Cast()]; + List glyphsToRemove = []; + foreach (ControlBodyGlyph g in BodyGlyphAdorner.Glyphs) + { +@@ -412,7 +412,7 @@ internal sealed class SelectionManager : IDisposable + SelectionGlyphAdorner.Glyphs.Clear(); + BodyGlyphAdorner.Glyphs.Clear(); + +- List selComps = _selectionService.GetSelectedComponents().Cast().ToList(); ++ List selComps = [.._selectionService.GetSelectedComponents().Cast()]; + object? primarySelection = _selectionService.PrimarySelection; + + // add all control glyphs to all controls on rootComp +diff --git a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/Behavior/TableLayoutPanelBehavior.cs b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/Behavior/TableLayoutPanelBehavior.cs +index eb6b29b06..a0514c3ac 100644 +--- a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/Behavior/TableLayoutPanelBehavior.cs ++++ b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/Behavior/TableLayoutPanelBehavior.cs +@@ -166,7 +166,7 @@ internal class TableLayoutPanelBehavior : Behavior + { + if ((_styles is null || isColumn != _currentColumnStyles) && _table is not null) + { +- _styles = ((TableLayoutStyleCollection)_changedProp.GetValue(_table)).Cast().ToList(); ++ _styles = [..((TableLayoutStyleCollection)_changedProp.GetValue(_table)).Cast()]; + _currentColumnStyles = isColumn; + } + } +diff --git a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/Behavior/ToolStripPanelSelectionBehavior.cs b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/Behavior/ToolStripPanelSelectionBehavior.cs +index e717ea8d0..1f5aa98e0 100644 +--- a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/Behavior/ToolStripPanelSelectionBehavior.cs ++++ b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/Behavior/ToolStripPanelSelectionBehavior.cs +@@ -223,7 +223,7 @@ internal sealed class ToolStripPanelSelectionBehavior : Behavior + + if (e.Data is DropSourceBehavior.BehaviorDataObject data) + { +- components = new List(data.DragComponents); ++ components = [..data.DragComponents]; + + foreach (IComponent dragComponent in components) + { +diff --git a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/CommandSet.cs b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/CommandSet.cs +index d39ed9f70..2b4645fd5 100644 +--- a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/CommandSet.cs ++++ b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/CommandSet.cs +@@ -804,7 +804,7 @@ internal partial class CommandSet : IDisposable + // Don't snap if we are moving a component in the ComponentTray + if (invertSnap && useSnapLines && primaryControl is not null && comp.Site is not null) + { +- List selComps = SelectionService.GetSelectedComponents().Cast().ToList(); ++ List selComps = [..SelectionService.GetSelectedComponents().Cast()]; + + // create our snapline engine + dragManager = new DragAssistanceManager(comp.Site, selComps); +diff --git a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/FlowLayoutPanelDesigner .cs b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/FlowLayoutPanelDesigner .cs +index 3db868f5c..0e92902a0 100644 +--- a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/FlowLayoutPanelDesigner .cs ++++ b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/FlowLayoutPanelDesigner .cs +@@ -757,7 +757,7 @@ internal partial class FlowLayoutPanelDesigner : FlowPanelDesigner + // Get the sorted drag controls. We use these for an internal drag. + if (de.Data is DropSourceBehavior.BehaviorDataObject data) + { +- _dragControls = data.GetSortedDragControls(out int primaryIndex).OfType().ToList(); ++ _dragControls = [..data.GetSortedDragControls(out int primaryIndex).OfType()]; + _primaryDragControl = _dragControls[primaryIndex]; + } + +diff --git a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/OleDragDropHandler.cs b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/OleDragDropHandler.cs +index bcf00c49a..8adc80b1c 100644 +--- a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/OleDragDropHandler.cs ++++ b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/OleDragDropHandler.cs +@@ -257,7 +257,7 @@ internal partial class OleDragDropHandler + { + host?.Activate(); + +- List selectComps = new(comps); ++ List selectComps = [..comps]; + + for (int i = 0; i < comps.Length; i++) + { +diff --git a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/TableLayoutPanelDesigner.cs b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/TableLayoutPanelDesigner.cs +index 1ea69253c..7f8d0da94 100644 +--- a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/TableLayoutPanelDesigner.cs ++++ b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/TableLayoutPanelDesigner.cs +@@ -952,7 +952,7 @@ internal partial class TableLayoutPanelDesigner : FlowPanelDesigner + { + if (de.Data is DropSourceBehavior.BehaviorDataObject data) + { +- _dragComponents = new List(data.DragComponents); ++ _dragComponents = [..data.DragComponents]; + return _dragComponents[0] as Control; + } + diff --git a/src/System.Windows.Forms/src/System/Windows/Forms/ActiveX/AxHost.AxPropertyDescriptor.cs b/src/System.Windows.Forms/src/System/Windows/Forms/ActiveX/AxHost.AxPropertyDescriptor.cs index 0d60dda12..d66e015cd 100644 --- a/src/System.Windows.Forms/src/System/Windows/Forms/ActiveX/AxHost.AxPropertyDescriptor.cs From 44f528c9cd429ca831f67d28a14ab02db7c65c40 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Thu, 9 Jan 2025 09:06:16 +0100 Subject: [PATCH 17/19] Revert pool image update now that images got updated by core-eng --- eng/pipelines/templates/variables/vmr-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/templates/variables/vmr-build.yml b/eng/pipelines/templates/variables/vmr-build.yml index 6a53179a8f98..b689b821f8e6 100644 --- a/eng/pipelines/templates/variables/vmr-build.yml +++ b/eng/pipelines/templates/variables/vmr-build.yml @@ -151,7 +151,7 @@ variables: - name: poolImage_Mac value: macos-13 - name: poolImage_Windows - value: windows.vs2022preview.scout.amd64.open + value: windows.vs2022preview.amd64.open - ${{ else }}: - ${{ if in(variables['Build.Reason'], 'PullRequest') }}: - name: defaultPoolName From f161609fa2c144cb5c5f7a6b15bc44cad0a85a7f Mon Sep 17 00:00:00 2001 From: Matt Thalman Date: Thu, 9 Jan 2025 06:09:03 -0600 Subject: [PATCH 18/19] delete obsolete nuget-client patch --- ...01-Fix-formatting-in-GraphOperations.patch | 23 ------------------- 1 file changed, 23 deletions(-) delete mode 100644 src/SourceBuild/patches/nuget-client/0001-Fix-formatting-in-GraphOperations.patch diff --git a/src/SourceBuild/patches/nuget-client/0001-Fix-formatting-in-GraphOperations.patch b/src/SourceBuild/patches/nuget-client/0001-Fix-formatting-in-GraphOperations.patch deleted file mode 100644 index d0fc3df85cad..000000000000 --- a/src/SourceBuild/patches/nuget-client/0001-Fix-formatting-in-GraphOperations.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 4172c85f6765aced2483ba6342df3b82ccc1b666 Mon Sep 17 00:00:00 2001 -From: Matt Thalman -Date: Tue, 7 Jan 2025 13:39:07 -0600 -Subject: [PATCH] Fix formatting in GraphOperations - -Backport: https://github.com/NuGet/NuGet.Client/pull/6212 ---- - .../NuGet.DependencyResolver.Core/GraphModel/GraphOperations.cs | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/NuGet.Core/NuGet.DependencyResolver.Core/GraphModel/GraphOperations.cs b/src/NuGet.Core/NuGet.DependencyResolver.Core/GraphModel/GraphOperations.cs -index cd5341edb..57f73ae6c 100644 ---- a/src/NuGet.Core/NuGet.DependencyResolver.Core/GraphModel/GraphOperations.cs -+++ b/src/NuGet.Core/NuGet.DependencyResolver.Core/GraphModel/GraphOperations.cs -@@ -872,7 +872,7 @@ private static void DetectAndMarkAmbiguousCentralTransitiveDependencies(T - // Some node were marked ambiguous, thus we need another run to check if nodes previously not marked ambiguous should be marked ambiguous this time. - if (!nodeMarkedAmbiguous) - break; -- }; -+ } - } - - private static void RejectCentralTransitiveBecauseOfRejectedParents(this GraphNode root, Tracker tracker, List> centralTransitiveNodes) From 6f7dc85f66c473e245b379b20d40a2d8b6c20e78 Mon Sep 17 00:00:00 2001 From: Matt Thalman Date: Thu, 9 Jan 2025 07:17:32 -0600 Subject: [PATCH 19/19] Delete obsolete vstest patch --- .../0001-Fix-formatting-in-Runner.patch | 23 ------------------- 1 file changed, 23 deletions(-) delete mode 100644 src/SourceBuild/patches/vstest/0001-Fix-formatting-in-Runner.patch diff --git a/src/SourceBuild/patches/vstest/0001-Fix-formatting-in-Runner.patch b/src/SourceBuild/patches/vstest/0001-Fix-formatting-in-Runner.patch deleted file mode 100644 index 78c2550ac4b4..000000000000 --- a/src/SourceBuild/patches/vstest/0001-Fix-formatting-in-Runner.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 4b3395b9d8de274f74d2540fca406944f8d0b0f3 Mon Sep 17 00:00:00 2001 -From: Matt Thalman -Date: Tue, 7 Jan 2025 14:50:28 -0600 -Subject: [PATCH] Fix formatting in Runner - -Backport: https://github.com/microsoft/vstest/pull/13871 ---- - test/Intent/Runner.cs | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/test/Intent/Runner.cs b/test/Intent/Runner.cs -index cbe7706cb..fad005b98 100644 ---- a/test/Intent/Runner.cs -+++ b/test/Intent/Runner.cs -@@ -68,7 +68,7 @@ public class Runner - // When the result is a task we need to await it. - // TODO: this can be improved with await, imho - task.GetAwaiter().GetResult(); -- }; -+ } - - passed++; - logger.WriteTestPassed(method, testStopwatch.Elapsed);