From 62691614bbd61856e40986df43f8e9a43274b48f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Oct 2023 12:50:05 -0600 Subject: [PATCH 01/30] Bump powershell from 7.3.8 to 7.3.9 (#227) Bumps [powershell](https://github.com/PowerShell/PowerShell) from 7.3.8 to 7.3.9. - [Release notes](https://github.com/PowerShell/PowerShell/releases) - [Commits](https://github.com/PowerShell/PowerShell/compare/v7.3.8...v7.3.9) --- updated-dependencies: - dependency-name: powershell dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .config/dotnet-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index b935d933f..de46e939b 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "powershell": { - "version": "7.3.8", + "version": "7.3.9", "commands": [ "pwsh" ] From 2e6c239bbcb193809c4379a7f7797e734d0c988c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Nov 2023 11:09:57 -0700 Subject: [PATCH 02/30] Bump xunit from 2.5.3 to 2.6.1 (#228) Bumps [xunit](https://github.com/xunit/xunit) from 2.5.3 to 2.6.1. - [Commits](https://github.com/xunit/xunit/compare/2.5.3...2.6.1) --- updated-dependencies: - dependency-name: xunit dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 47b1fc9c7..c5b4d4835 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -7,7 +7,7 @@ - + From 4337ca1c8ebf7bff355d024ab525e9428d8a0bb4 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 8 Nov 2023 06:41:30 -0700 Subject: [PATCH 03/30] Ignore `dotnet-format` v9 versions --- .github/dependabot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a0e8933bb..9053ac863 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -10,4 +10,4 @@ updates: ignore: # This package has unlisted versions on nuget.org that are not supported. Avoid them. - dependency-name: dotnet-format - versions: ["6.x", "7.x", "8.x"] + versions: ["6.x", "7.x", "8.x", "9.x"] From 5a0cd156d0da7a37b76ac60b8c5245494958f51f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Nov 2023 06:49:02 -0700 Subject: [PATCH 04/30] Bump Microsoft.NET.Test.Sdk from 17.7.2 to 17.8.0 (#229) Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.7.2 to 17.8.0. - [Release notes](https://github.com/microsoft/vstest/releases) - [Changelog](https://github.com/microsoft/vstest/blob/main/docs/releases.md) - [Commits](https://github.com/microsoft/vstest/compare/v17.7.2...v17.8.0) --- updated-dependencies: - dependency-name: Microsoft.NET.Test.Sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index c5b4d4835..faa3fc68b 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -5,7 +5,7 @@ true - + From 0fcb1d81a073695876aca758d81881c182de864b Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 13 Nov 2023 15:26:34 -0700 Subject: [PATCH 05/30] Apply Directory.Packages.props in Apply-Template.ps1 --- Apply-Template.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Apply-Template.ps1 b/Apply-Template.ps1 index 1c7733558..42ed33623 100644 --- a/Apply-Template.ps1 +++ b/Apply-Template.ps1 @@ -36,7 +36,7 @@ robocopy /mir $PSScriptRoot/.devcontainer $Path/.devcontainer robocopy /mir $PSScriptRoot/.github $Path/.github robocopy /mir $PSScriptRoot/.vscode $Path/.vscode robocopy /mir $PSScriptRoot/tools $Path/tools -robocopy $PSScriptRoot $Path Directory.Build.* global.json init.* azure-pipelines.yml .gitignore .gitattributes .editorconfig +robocopy $PSScriptRoot $Path Directory.Build.* Directory.Packages.props global.json init.* azure-pipelines.yml .gitignore .gitattributes .editorconfig robocopy $PSScriptRoot/src $Path/src Directory.Build.* .editorconfig AssemblyInfo.cs robocopy $PSScriptRoot/test $Path/test Directory.Build.* .editorconfig Remove-Item $Path/azure-pipelines/expand-template.yml From e678b457c03adcff1f5459586095c27a3a88f15d Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 14 Nov 2023 21:38:21 -0700 Subject: [PATCH 06/30] Bump to the .NET 8.0.100 SDK --- .devcontainer/Dockerfile | 2 +- Directory.Build.props | 2 +- global.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index cef7ac6f7..b680b1dbc 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,5 @@ # Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions -FROM mcr.microsoft.com/dotnet/sdk:7.0.401-jammy +FROM mcr.microsoft.com/dotnet/sdk:8.0.100-jammy # Installing mono makes `dotnet test` work without errors even for net472. # But installing it takes a long time, so it's excluded by default. diff --git a/Directory.Build.props b/Directory.Build.props index 22986f2f3..d3edacc82 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -5,7 +5,7 @@ $(RepoRootPath)obj\$([MSBuild]::MakeRelative($(RepoRootPath), $(MSBuildProjectDirectory)))\ $(RepoRootPath)bin\$(MSBuildProjectName)\ $(RepoRootPath)bin\Packages\$(Configuration)\ - 11 + 12 enable enable latest diff --git a/global.json b/global.json index f153194c4..d24a9b70b 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "7.0.401", + "version": "8.0.100", "rollForward": "patch", "allowPrerelease": false } From d1ffce8a4b3a570dc97532af7cb7d6cf47ccc82d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Nov 2023 12:36:51 -0700 Subject: [PATCH 07/30] Bump xunit from 2.6.1 to 2.6.2 (#234) Bumps [xunit](https://github.com/xunit/xunit) from 2.6.1 to 2.6.2. - [Commits](https://github.com/xunit/xunit/compare/2.6.1...2.6.2) --- updated-dependencies: - dependency-name: xunit dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index faa3fc68b..272353bff 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -7,7 +7,7 @@ - + From ccd2c89fa9aa2e2e991cd15f16827bcbe654fc10 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Nov 2023 12:37:45 -0700 Subject: [PATCH 08/30] Bump Microsoft.SourceLink.GitHub from 1.1.1 to 8.0.0 (#232) Bumps [Microsoft.SourceLink.GitHub](https://github.com/dotnet/sourcelink) from 1.1.1 to 8.0.0. - [Release notes](https://github.com/dotnet/sourcelink/releases) - [Commits](https://github.com/dotnet/sourcelink/compare/1.1.1...8.0.0) --- updated-dependencies: - dependency-name: Microsoft.SourceLink.GitHub dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 272353bff..9ac2f3710 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -17,6 +17,6 @@ - + From 42894612a6492693491c9a91b3e314d8f10658e8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Nov 2023 12:37:58 -0700 Subject: [PATCH 09/30] Bump powershell from 7.3.9 to 7.4.0 (#231) Bumps [powershell](https://github.com/PowerShell/PowerShell) from 7.3.9 to 7.4.0. - [Release notes](https://github.com/PowerShell/PowerShell/releases) - [Commits](https://github.com/PowerShell/PowerShell/compare/v7.3.9...v7.4.0) --- updated-dependencies: - dependency-name: powershell dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .config/dotnet-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index de46e939b..7a4b9444e 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "powershell": { - "version": "7.3.9", + "version": "7.4.0", "commands": [ "pwsh" ] From 7e872d33dbd08fce619141103e8c8c7bcf7cd966 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Nov 2023 19:43:19 +0000 Subject: [PATCH 10/30] Bump xunit.runner.visualstudio from 2.5.3 to 2.5.4 (#233) --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 9ac2f3710..3ad9b7937 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -6,7 +6,7 @@ - + From 5da8083e9f0a5f79f906d27e8d8dda3386f02bb1 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 22 Nov 2023 11:58:24 -0700 Subject: [PATCH 11/30] Validate formatted code in builds --- azure-pipelines/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines/build.yml b/azure-pipelines/build.yml index 9c445f727..5d1835d56 100644 --- a/azure-pipelines/build.yml +++ b/azure-pipelines/build.yml @@ -36,6 +36,8 @@ jobs: - template: dotnet.yml parameters: RunTests: ${{ parameters.RunTests }} + - script: dotnet format --verify-no-changes --no-restore + displayName: 💅 Verify formatted code - template: expand-template.yml - job: macOS From c4890509d2ef60e24bbed0ec213882bcead28848 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 22 Nov 2023 13:42:32 -0700 Subject: [PATCH 12/30] Enable auto-format on save in VS and VS Code --- .vscode/settings.json | 3 ++- settings.VisualStudio.json | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 settings.VisualStudio.json diff --git a/.vscode/settings.json b/.vscode/settings.json index 54c5c6896..5101737c1 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,5 +4,6 @@ "files.trimFinalNewlines": true, "omnisharp.enableEditorConfigSupport": true, "omnisharp.enableRoslynAnalyzers": true, - "dotnet.completion.showCompletionItemsFromUnimportedNamespaces": true + "dotnet.completion.showCompletionItemsFromUnimportedNamespaces": true, + "editor.formatOnSave": true } diff --git a/settings.VisualStudio.json b/settings.VisualStudio.json new file mode 100644 index 000000000..7abb4a060 --- /dev/null +++ b/settings.VisualStudio.json @@ -0,0 +1,3 @@ +{ + "textEditor.codeCleanup.profile": "profile1" +} From 41f6d2704083294ec0338f68e2bc54f461177c58 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 22 Nov 2023 14:37:47 -0700 Subject: [PATCH 13/30] Remove `dotnet-format` as a tool It's part of the SDK now, and the version on nuget.org is no longer maintained. --- .config/dotnet-tools.json | 8 +------- .github/dependabot.yml | 4 ---- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 7a4b9444e..0e4a78462 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -8,12 +8,6 @@ "pwsh" ] }, - "dotnet-format": { - "version": "5.1.250801", - "commands": [ - "dotnet-format" - ] - }, "dotnet-coverage": { "version": "17.9.3", "commands": [ @@ -27,4 +21,4 @@ ] } } -} +} \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 9053ac863..63e3e890b 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,7 +7,3 @@ updates: directory: / schedule: interval: weekly - ignore: - # This package has unlisted versions on nuget.org that are not supported. Avoid them. - - dependency-name: dotnet-format - versions: ["6.x", "7.x", "8.x", "9.x"] From ac3f1dff5d485d6e8c56998c87bb3665f0d4bbf9 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 29 Nov 2023 07:09:14 -0700 Subject: [PATCH 14/30] Make symbolic link failures more detectable --- azure-pipelines/artifacts/_stage_all.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/azure-pipelines/artifacts/_stage_all.ps1 b/azure-pipelines/artifacts/_stage_all.ps1 index d81d16d46..b077931cc 100644 --- a/azure-pipelines/artifacts/_stage_all.ps1 +++ b/azure-pipelines/artifacts/_stage_all.ps1 @@ -30,6 +30,12 @@ function Create-SymbolicLink { } else { cmd /c "mklink `"$Link`" `"$Target`"" | Out-Null } + + if ($LASTEXITCODE -ne 0) { + # Windows requires admin privileges to create symbolic links + # unless Developer Mode has been enabled. + throw "Failed to create symbolic link at $Link that points to $Target" + } } # Stage all artifacts From d0e3bf5b2a3af31b97b7013bd10cb7ebc065db61 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Thu, 30 Nov 2023 11:54:14 -0700 Subject: [PATCH 15/30] Update TeamName comment --- azure-pipelines/variables/TeamName.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines/variables/TeamName.ps1 b/azure-pipelines/variables/TeamName.ps1 index 5f2822c50..ba9c82310 100644 --- a/azure-pipelines/variables/TeamName.ps1 +++ b/azure-pipelines/variables/TeamName.ps1 @@ -1,2 +1,2 @@ -# This value is used to craft a \\cpvsbuild\drops path for symbol archival. +# This value is used as an input to the MicroBuild Insert VS task. 'VS IDE' From 41771506014fc409c68858d14c2e061d4c2de665 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Thu, 30 Nov 2023 11:56:35 -0700 Subject: [PATCH 16/30] Add xml header to msbuild files MSBuild doesn't need them, but Azure Repos won't recognize .targets and .props files as xml files without it. And recognizing them means syntax coloring, which is worthwhile. --- Directory.Build.props | 1 + Directory.Build.targets | 1 + Directory.Packages.props | 1 + src/Directory.Build.props | 1 + src/Directory.Build.targets | 1 + test/Directory.Build.props | 1 + test/Directory.Build.targets | 1 + 7 files changed, 7 insertions(+) diff --git a/Directory.Build.props b/Directory.Build.props index d3edacc82..e42ac60a6 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,3 +1,4 @@ + Debug diff --git a/Directory.Build.targets b/Directory.Build.targets index ea7b6e6f8..cc8184aac 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,3 +1,4 @@ + diff --git a/Directory.Packages.props b/Directory.Packages.props index 3ad9b7937..6cf06aef4 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -1,3 +1,4 @@ + diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 5e648d5ee..9ba7818d4 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,3 +1,4 @@ + diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index c1d929a5b..07f413461 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -1,3 +1,4 @@ + diff --git a/test/Directory.Build.props b/test/Directory.Build.props index ad4a4b6c5..6c7aa71dc 100644 --- a/test/Directory.Build.props +++ b/test/Directory.Build.props @@ -1,3 +1,4 @@ + diff --git a/test/Directory.Build.targets b/test/Directory.Build.targets index 052fe3ef0..a6e0f4ace 100644 --- a/test/Directory.Build.targets +++ b/test/Directory.Build.targets @@ -1,3 +1,4 @@ + From 140a33b14a9c0846c28974745ad70d9d4dbdac75 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Thu, 30 Nov 2023 15:42:28 -0700 Subject: [PATCH 17/30] Update Microsoft.SourceLink.AzureRepos.Git to 8.0.0 --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index da5ca7c6e..a7a2c0374 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -21,7 +21,7 @@ - + From db4440205ad8c7adac61bea7aea42a63496599d7 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 1 Dec 2023 12:28:16 -0700 Subject: [PATCH 18/30] Stop VS Code from wrapping xml files --- .vscode/settings.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 5101737c1..ce72437ca 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,5 +5,8 @@ "omnisharp.enableEditorConfigSupport": true, "omnisharp.enableRoslynAnalyzers": true, "dotnet.completion.showCompletionItemsFromUnimportedNamespaces": true, - "editor.formatOnSave": true + "editor.formatOnSave": true, + "[xml]": { + "editor.wordWrap": "off" + } } From 3a5c8f0ee6540b10f7c58f6489bd0b3ca286c6b2 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 11 Dec 2023 13:19:20 -0700 Subject: [PATCH 19/30] Add dotnet_separate_import_directive_groups to .editorconfig This is the default setting in VS, but folks who have changed the setting can cause noise in PRs unless we pin the setting at the repo level. --- .editorconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/.editorconfig b/.editorconfig index 959801c2e..ffae180a8 100644 --- a/.editorconfig +++ b/.editorconfig @@ -40,6 +40,7 @@ indent_size = 4 [*.{cs,vb}] # Sort using and Import directives with System.* appearing first dotnet_sort_system_directives_first = true +dotnet_separate_import_directive_groups = false dotnet_style_qualification_for_field = true:warning dotnet_style_qualification_for_property = true:warning dotnet_style_qualification_for_method = true:warning From f8f3f9e2501d480a8d313c2e36bdd978c4191813 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Dec 2023 17:12:47 -0700 Subject: [PATCH 20/30] Bump xunit from 2.6.2 to 2.6.3 (#239) Bumps [xunit](https://github.com/xunit/xunit) from 2.6.2 to 2.6.3. - [Commits](https://github.com/xunit/xunit/compare/2.6.2...2.6.3) --- updated-dependencies: - dependency-name: xunit dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 6cf06aef4..041ea3d1e 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -8,7 +8,7 @@ - + From 20c7541a3ca7b7cd4c7fa30335be69e31b1d41a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Dec 2023 17:13:10 -0700 Subject: [PATCH 21/30] Bump dotnet-coverage from 17.9.3 to 17.9.5 (#238) Bumps [dotnet-coverage](https://github.com/microsoft/codecoverage) from 17.9.3 to 17.9.5. - [Commits](https://github.com/microsoft/codecoverage/commits) --- updated-dependencies: - dependency-name: dotnet-coverage dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .config/dotnet-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 0e4a78462..c08307f6e 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -9,7 +9,7 @@ ] }, "dotnet-coverage": { - "version": "17.9.3", + "version": "17.9.5", "commands": [ "dotnet-coverage" ] From 37705a891a10e45737c3c8d4fb8708141738ec1b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Dec 2023 00:20:18 +0000 Subject: [PATCH 22/30] Bump xunit.runner.visualstudio from 2.5.4 to 2.5.5 (#237) --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 041ea3d1e..4cf7998db 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -7,7 +7,7 @@ - + From 5af59eca86c56ea86c6027d2231bdf6d1c867ffe Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 12 Dec 2023 18:31:07 -0700 Subject: [PATCH 23/30] Include SBOM in nuget packages --- Directory.Build.targets | 2 ++ azure-pipelines/NuGetSbom.targets | 12 ++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 azure-pipelines/NuGetSbom.targets diff --git a/Directory.Build.targets b/Directory.Build.targets index cc8184aac..4549a848c 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -9,4 +9,6 @@ + + diff --git a/azure-pipelines/NuGetSbom.targets b/azure-pipelines/NuGetSbom.targets new file mode 100644 index 000000000..a2599e882 --- /dev/null +++ b/azure-pipelines/NuGetSbom.targets @@ -0,0 +1,12 @@ + + + true + $(TargetsForTfmSpecificBuildOutput);IncludeSbomInNupkg + + + + + + + + From 4b35644de258b6b4de47d1c9de86a69d0bcb0d3f Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 12 Dec 2023 18:32:49 -0700 Subject: [PATCH 24/30] Fix `Install-NuGetPackage` exit code check Somehow, there is a race condition where the exit code can be null then transition to 0 later. This caused the script to inappropriately fail by throwing, aborting installation of microbuild plugins. --- azure-pipelines/Install-NuGetPackage.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines/Install-NuGetPackage.ps1 b/azure-pipelines/Install-NuGetPackage.ps1 index cdac73085..9afde0550 100644 --- a/azure-pipelines/Install-NuGetPackage.ps1 +++ b/azure-pipelines/Install-NuGetPackage.ps1 @@ -45,7 +45,7 @@ try { if ($PSCmdlet.ShouldProcess($PackageId, 'nuget install')) { $p = Start-Process $nugetPath $nugetArgs -NoNewWindow -Wait -PassThru - if ($p.ExitCode -ne 0) { throw } + if ($null -ne $p.ExitCode -and $p.ExitCode -ne 0) { throw } } # Provide the path to the installed package directory to our caller. From 248800d80bd96641c6b2369e03be0f9c1705c2d6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Sep 2023 10:51:27 +0000 Subject: [PATCH 25/30] Bump Xunit.Combinatorial from 1.5.25 to 1.6.24 Bumps Xunit.Combinatorial from 1.5.25 to 1.6.24. --- updated-dependencies: - dependency-name: Xunit.Combinatorial dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index f1d7a495e..d5c9fcca1 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -43,7 +43,7 @@ - + From 67fed581559f70d108fc166a99c61728c0f4b768 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Nov 2023 10:56:31 +0000 Subject: [PATCH 26/30] Bump System.Drawing.Common from 7.0.0 to 8.0.0 Bumps System.Drawing.Common from 7.0.0 to 8.0.0. --- updated-dependencies: - dependency-name: System.Drawing.Common dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index d5c9fcca1..8484a0e91 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -35,7 +35,7 @@ - + From 7ea5ed84e3d1a04f5dec58b41c70db4a06b63e1f Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 5 Jan 2024 22:26:16 -0700 Subject: [PATCH 27/30] Fix tests --- test/IsolatedTestHost/App.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/IsolatedTestHost/App.config b/test/IsolatedTestHost/App.config index 2a58d341c..f899e7a15 100644 --- a/test/IsolatedTestHost/App.config +++ b/test/IsolatedTestHost/App.config @@ -10,13 +10,13 @@ - + - + From e268bc52cca75f44a89198f2849554ea9d110f97 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sat, 6 Jan 2024 14:24:07 +0000 Subject: [PATCH 28/30] Fix build break --- init.ps1 | 0 src/Microsoft.VisualStudio.Threading/AsyncLazy`1.cs | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) mode change 100644 => 100755 init.ps1 diff --git a/init.ps1 b/init.ps1 old mode 100644 new mode 100755 diff --git a/src/Microsoft.VisualStudio.Threading/AsyncLazy`1.cs b/src/Microsoft.VisualStudio.Threading/AsyncLazy`1.cs index a809391a8..0b98fc7ad 100644 --- a/src/Microsoft.VisualStudio.Threading/AsyncLazy`1.cs +++ b/src/Microsoft.VisualStudio.Threading/AsyncLazy`1.cs @@ -36,14 +36,14 @@ public class AsyncLazy private readonly object syncObject = new object(); /// - /// The unique instance identifier. + /// An optional means to avoid deadlocks when synchronous APIs are called that must invoke async methods in user code. /// - private AsyncLocal? recursiveFactoryCheck; + private readonly JoinableTaskFactory? jobFactory; /// - /// An optional means to avoid deadlocks when synchronous APIs are called that must invoke async methods in user code. + /// The unique instance identifier. /// - private readonly JoinableTaskFactory? jobFactory; + private AsyncLocal? recursiveFactoryCheck; /// /// The function to invoke to produce the task. From 30e1048a3fe772f6a754c53d29d941d870d6991d Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sat, 6 Jan 2024 14:41:58 +0000 Subject: [PATCH 29/30] Fix whitespace issues --- .../CommonFixes.cs | 6 +++--- .../AbstractVSTHRD011UseAsyncLazyAnalyzer.cs | 6 +++--- .../TplExtensions.cs | 2 +- .../MultiAnalyzerTests.cs | 4 ++-- .../AsyncAutoResetEventTests.cs | 6 +++--- .../AsyncReaderWriterLockTests.cs | 2 +- .../JoinableTaskContextTests.cs | 12 ++++++------ 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/Microsoft.VisualStudio.Threading.Analyzers.CodeFixes/CommonFixes.cs b/src/Microsoft.VisualStudio.Threading.Analyzers.CodeFixes/CommonFixes.cs index c4c7b1838..79015ac8d 100644 --- a/src/Microsoft.VisualStudio.Threading.Analyzers.CodeFixes/CommonFixes.cs +++ b/src/Microsoft.VisualStudio.Threading.Analyzers.CodeFixes/CommonFixes.cs @@ -47,9 +47,9 @@ internal static async Task> ReadAdditionalFilesAsync(IEnu } IEnumerable? docs = from doc in additionalFiles.OrderBy(x => x.FilePath, StringComparer.Ordinal) - let fileName = Path.GetFileName(doc.Name) - where fileNamePattern.IsMatch(fileName) - select doc; + let fileName = Path.GetFileName(doc.Name) + where fileNamePattern.IsMatch(fileName) + select doc; ImmutableArray.Builder? result = ImmutableArray.CreateBuilder(); foreach (TextDocument? doc in docs) { diff --git a/src/Microsoft.VisualStudio.Threading.Analyzers/AbstractVSTHRD011UseAsyncLazyAnalyzer.cs b/src/Microsoft.VisualStudio.Threading.Analyzers/AbstractVSTHRD011UseAsyncLazyAnalyzer.cs index 44a599998..7147399f3 100644 --- a/src/Microsoft.VisualStudio.Threading.Analyzers/AbstractVSTHRD011UseAsyncLazyAnalyzer.cs +++ b/src/Microsoft.VisualStudio.Threading.Analyzers/AbstractVSTHRD011UseAsyncLazyAnalyzer.cs @@ -71,9 +71,9 @@ private void AnalyzeNode(OperationAnalysisContext context) if (firstArgExpression is IDelegateCreationOperation { Target: IAnonymousFunctionOperation anonFunc }) { System.Collections.Generic.IEnumerable? problems = from invocation in anonFunc.Descendants().OfType() - let invokedSymbol = invocation.TargetMethod - where invokedSymbol is object && CommonInterest.SyncBlockingMethods.Any(m => m.Method.IsMatch(invokedSymbol)) - select invocation; + let invokedSymbol = invocation.TargetMethod + where invokedSymbol is object && CommonInterest.SyncBlockingMethods.Any(m => m.Method.IsMatch(invokedSymbol)) + select invocation; IInvocationOperation? firstProblem = problems.FirstOrDefault(); if (firstProblem is object) { diff --git a/src/Microsoft.VisualStudio.Threading/TplExtensions.cs b/src/Microsoft.VisualStudio.Threading/TplExtensions.cs index 7fe2a473d..9fdb6aa76 100644 --- a/src/Microsoft.VisualStudio.Threading/TplExtensions.cs +++ b/src/Microsoft.VisualStudio.Threading/TplExtensions.cs @@ -121,7 +121,7 @@ public static void ApplyResultTo(this Task task, TaskCompletionSource t /// The task whose completion should be applied to another. /// The task that should receive the completion status. public static void ApplyResultTo(this Task task, TaskCompletionSource tcs) - //// where T : defaultable + //// where T : defaultable { Requires.NotNull(task, nameof(task)); Requires.NotNull(tcs, nameof(tcs)); diff --git a/test/Microsoft.VisualStudio.Threading.Analyzers.Tests/MultiAnalyzerTests.cs b/test/Microsoft.VisualStudio.Threading.Analyzers.Tests/MultiAnalyzerTests.cs index b052dbc59..9d4a61437 100644 --- a/test/Microsoft.VisualStudio.Threading.Analyzers.Tests/MultiAnalyzerTests.cs +++ b/test/Microsoft.VisualStudio.Threading.Analyzers.Tests/MultiAnalyzerTests.cs @@ -330,8 +330,8 @@ public class Test : CSharpCodeFixVerifier GetDiagnosticAnalyzers() { IEnumerable? analyzers = from type in typeof(VSTHRD002UseJtfRunAnalyzer).Assembly.GetTypes() - where type.GetCustomAttributes(typeof(DiagnosticAnalyzerAttribute), true).Any() - select (DiagnosticAnalyzer?)Activator.CreateInstance(type) ?? throw Assumes.Fail("Unable to instantiate the analyzer"); + where type.GetCustomAttributes(typeof(DiagnosticAnalyzerAttribute), true).Any() + select (DiagnosticAnalyzer?)Activator.CreateInstance(type) ?? throw Assumes.Fail("Unable to instantiate the analyzer"); return analyzers.ToImmutableArray(); } } diff --git a/test/Microsoft.VisualStudio.Threading.Tests/AsyncAutoResetEventTests.cs b/test/Microsoft.VisualStudio.Threading.Tests/AsyncAutoResetEventTests.cs index fffb45d83..5bfb23e95 100644 --- a/test/Microsoft.VisualStudio.Threading.Tests/AsyncAutoResetEventTests.cs +++ b/test/Microsoft.VisualStudio.Threading.Tests/AsyncAutoResetEventTests.cs @@ -74,9 +74,9 @@ public void SetReturnsBeforeInlinedContinuations() .ContinueWith( delegate { - // Arrange to synchronously block the continuation until Set() has returned, - // which would deadlock if Set does not return until inlined continuations complete. - Assert.True(setReturned.Wait(AsyncDelay)); + // Arrange to synchronously block the continuation until Set() has returned, + // which would deadlock if Set does not return until inlined continuations complete. + Assert.True(setReturned.Wait(AsyncDelay)); }, TaskContinuationOptions.ExecuteSynchronously); this.evt.Set(); diff --git a/test/Microsoft.VisualStudio.Threading.Tests/AsyncReaderWriterLockTests.cs b/test/Microsoft.VisualStudio.Threading.Tests/AsyncReaderWriterLockTests.cs index 4f0a78ab5..40aa53f35 100644 --- a/test/Microsoft.VisualStudio.Threading.Tests/AsyncReaderWriterLockTests.cs +++ b/test/Microsoft.VisualStudio.Threading.Tests/AsyncReaderWriterLockTests.cs @@ -4512,7 +4512,7 @@ await Task.WhenAll( await secondLockInQueue.SetAsync(); }), secondLockObtained.Task); - }); + }); } private Task UncontestedTopLevelLocksAllocFreeHelperAsync(Func locker, bool yieldingLock) diff --git a/test/Microsoft.VisualStudio.Threading.Tests/JoinableTaskContextTests.cs b/test/Microsoft.VisualStudio.Threading.Tests/JoinableTaskContextTests.cs index d0b00c42f..e50d64078 100644 --- a/test/Microsoft.VisualStudio.Threading.Tests/JoinableTaskContextTests.cs +++ b/test/Microsoft.VisualStudio.Threading.Tests/JoinableTaskContextTests.cs @@ -410,8 +410,8 @@ public void GetHangReportProducesDgmlWithNamedJoinableCollections() this.Logger.WriteLine(report.Content); var dgml = XDocument.Parse(report.Content); IEnumerable? collectionLabels = from node in dgml.Root!.Element(XName.Get("Nodes", DgmlNamespace))!.Elements() - where node.Attribute(XName.Get("Category"))?.Value == "Collection" - select node.Attribute(XName.Get("Label"))?.Value; + where node.Attribute(XName.Get("Category"))?.Value == "Collection" + select node.Attribute(XName.Get("Label"))?.Value; Assert.Contains(collectionLabels, label => label == jtcName); return Task.CompletedTask; }); @@ -433,8 +433,8 @@ public void GetHangReportProducesDgmlWithMethodNameRequestingMainThread() this.Logger.WriteLine(report.Content); var dgml = XDocument.Parse(report.Content); IEnumerable? collectionLabels = from node in dgml.Root!.Element(XName.Get("Nodes", DgmlNamespace))!.Elements() - where node.Attribute(XName.Get("Category"))?.Value == "Task" - select node.Attribute(XName.Get("Label"))?.Value; + where node.Attribute(XName.Get("Category"))?.Value == "Task" + select node.Attribute(XName.Get("Label"))?.Value; Assert.Contains(collectionLabels, label => label.Contains(nameof(this.GetHangReportProducesDgmlWithMethodNameRequestingMainThread))); } @@ -456,8 +456,8 @@ public void GetHangReportProducesDgmlWithMethodNameYieldingOnMainThread() this.Logger.WriteLine(report.Content); var dgml = XDocument.Parse(report.Content); IEnumerable? collectionLabels = from node in dgml.Root!.Element(XName.Get("Nodes", DgmlNamespace))!.Elements() - where node.Attribute(XName.Get("Category"))?.Value == "Task" - select node.Attribute(XName.Get("Label"))?.Value; + where node.Attribute(XName.Get("Category"))?.Value == "Task" + select node.Attribute(XName.Get("Label"))?.Value; Assert.Contains(collectionLabels, label => label.Contains(nameof(this.YieldingMethodAsync))); }); } From 52a1e174661987de31061a47df64076f11cb8366 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sat, 6 Jan 2024 14:53:47 +0000 Subject: [PATCH 30/30] Disable `dotnet format` check It's buggy, and fails for well-formatted syntax, but only in verify mode. --- azure-pipelines/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines/build.yml b/azure-pipelines/build.yml index 21608fb56..4ffbdc39a 100644 --- a/azure-pipelines/build.yml +++ b/azure-pipelines/build.yml @@ -70,6 +70,7 @@ jobs: RunTests: ${{ parameters.RunTests }} - script: dotnet format --verify-no-changes --no-restore displayName: 💅 Verify formatted code + enabled: false - job: macOS condition: and(${{ parameters.includeMacOS }}, ne(variables['OptProf'], 'true'))