Skip to content

Update VSSDK to 18.9.496-Preview - #84262

Merged
tmat merged 19 commits into
dotnet:mainfrom
tmat:vs-sdk
Jun 30, 2026
Merged

Update VSSDK to 18.9.496-Preview#84262
tmat merged 19 commits into
dotnet:mainfrom
tmat:vs-sdk

Conversation

@tmat

@tmat tmat commented Jun 24, 2026

Copy link
Copy Markdown
Member
Microsoft Reviewers: Open in CodeFlow

Copilot AI review requested due to automatic review settings June 24, 2026 17:36
@tmat
tmat requested review from a team as code owners June 24, 2026 17:36
@tmat
tmat marked this pull request as draft June 24, 2026 17:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Roslyn’s Visual Studio SDK/tooling and associated dependency pins to align with newer VS/VSSDK builds, along with a couple of small integration-test robustness tweaks needed after the upgrade.

Changes:

  • Bump VSSDK and related Visual Studio/NuGet package versions (including additional pinning to avoid type-forwarding collisions).
  • Update repo toolset requirements (global.json SDK + VS minimum version; Maestro-flowed dependency version bumps).
  • Harden outlining integration-test helpers by asserting outlining managers are present/non-null.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/VisualStudio/IntegrationTest/New.IntegrationTests/InProcess/EditorInProcess.cs Asserts outlining manager is present before querying regions (avoids null deref in tests).
src/VisualStudio/Core/Def/Implementation/VisualStudioWorkspaceContextService.cs Suppresses new obsoletion warning for CloudEnvironmentConnected_guid usage (tracked follow-up link).
src/Setup/DevDivInsertionFiles/DevDivInsertionFiles.csproj Excludes additional transitive dependencies from insertion dependency set (Google.Protobuf, Microsoft.ML.Tokenizers).
src/Razor/src/Razor/test/Microsoft.VisualStudio.Razor.IntegrationTests/InProcess/EditorInProcess_Outlining.cs Asserts outlining manager is non-null in Razor integration tests.
src/Razor/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.UnitTests/LspEditorFeatureDetectorTest.cs Suppresses obsoletion warning for CloudEnvironmentConnected_guid in unit tests.
src/Razor/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LspEditorFeatureDetector.cs Suppresses obsoletion warning for CloudEnvironmentConnected_guid in product code (Razor).
src/Razor/Directory.Packages.props Updates Razor-specific VS package versions (including Shell.Framework / Validation / Copilot package version).
src/EditorFeatures/CSharp/BlockCommentEditing/BlockCommentEditingCommandHandler.cs Switches to pooled builder disposer pattern for indentation construction.
global.json Updates required .NET SDK and minimum VS tool version used by repo tooling.
eng/Versions.props Updates System.ValueTuple version (both source-build and non-source-build conditions).
eng/Version.Details.xml Maestro dependency version updates for several dotnet/dotnet packages (source-build related).
eng/Version.Details.props Maestro dependency props updated to match Version.Details.xml.
eng/Packages.props Updates VSSDK to 18.9.496-Preview, refreshes related VS package versions, and pins Microsoft.VisualStudio.ComponentModelHost to avoid type collisions.

@peterwald

Copy link
Copy Markdown
Member

I need the same Microsoft.ServiceHub.Framework update in order to make progress on source based test discovery in C#DK.

tmat added 2 commits June 27, 2026 08:48
The VSSDK 18.9 update (this PR) changed that field's implementation: it used to be an eagerly-allocated  List<TextFormattingRunProperties> , but is now a  lazily-initialized  CachedMainThreadProperties  (a  List<>  subclass, null until first use). When no properties had been cached yet,  GetValue(null)  returns   null , so  existingProperties.Clear()  throws NRE.
Comment thread src/EditorFeatures/Core/EditAndContinue/VSServiceBrokerWrapper.cs Outdated
Comment thread src/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/DotnetCliHelper.cs Outdated
@tmat
tmat marked this pull request as ready for review June 29, 2026 22:20
@tmat
tmat requested a review from a team as a code owner June 29, 2026 22:20
Copilot AI review requested due to automatic review settings June 29, 2026 22:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 34 out of 34 changed files in this pull request and generated 10 comments.

@@ -16,10 +16,12 @@ Namespace Microsoft.CodeAnalysis.Editor.UnitTests
Friend NotInheritable Class StubVsServiceExporter(Of T As Class)
Inherits StubVsServiceExporter(Of T, T)

#Disable Warning VSMEF008 ' Import contract type not assignable to member type; TODO: https://github.com/dotnet/roslyn/issues/84327
@@ -23,10 +23,12 @@ Namespace Microsoft.CodeAnalysis.Editor.UnitTests

Private ReadOnly _serviceGetter As AsyncLazy(Of TInterface)

#Disable Warning VSMEF008 ' Import contract type not assignable to member type; TODO: https://github.com/dotnet/roslyn/issues/84327

[ExportCollaborationService(typeof(SessionActiveDetector), Scope = SessionScope.Guest)]
[method: ImportingConstructor]
#pragma warning disable VSMEF008 // TODO: https://github.com/dotnet/roslyn/issues/84327
Comment thread src/EditorFeatures/Core/EditAndContinue/VSServiceBrokerWrapper.cs
Comment thread eng/pipelines/variables-build.yml
Comment thread src/EditorFeatures/TestUtilities/EditorTestCompositions.cs
Comment thread src/Compilers/CSharp/Test/CommandLine/CommandLineTests.cs
Comment thread src/Compilers/VisualBasic/Test/CommandLine/CommandLineTests.vb
Copilot AI review requested due to automatic review settings June 29, 2026 22:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 34 out of 34 changed files in this pull request and generated 4 comments.

Comment thread src/Compilers/CSharp/Test/CommandLine/CommandLineTests.cs
Comment thread src/Compilers/VisualBasic/Test/CommandLine/CommandLineTests.vb
Comment thread src/EditorFeatures/TestUtilities/Workspaces/TestWorkspaceFixture.cs
Comment thread global.json
@tmat
tmat merged commit afda379 into dotnet:main Jun 30, 2026
28 checks passed
@tmat
tmat deleted the vs-sdk branch June 30, 2026 18:17
@akhera99

akhera99 commented Jul 1, 2026

Copy link
Copy Markdown
Member

/pr-val

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

View PR Validation Run triggered by @akhera99

Parameters
  • Validation Type: pr-val
  • Pipeline ID: 8972
  • Pipeline Version: main
  • PR Number: 84262
  • Commit SHA: 8e8acd513271c829a16a35a587bb2241f0540963
  • Source Branch: vs-sdk
  • Target Branch: main
  • Build ID: 14542912

JoeRobich added a commit that referenced this pull request Jul 24, 2026
…nalyzers multithreadable (#84343)

Enables the compiler MSBuild tasks (Csc/Vbc/etc.) to adopt MSBuild's
multithreaded task execution model, and marks the first such task.
details:
https://github.com/dotnet/msbuild/blob/main/documentation/specs/multithreading/multithreaded-msbuild.md

## Changes

**1. Bump `Microsoft.Build` to 18.7.1 and align the lagging `System.*`
to the 10.0.8 band** (`eng/Packages.props`, `eng/Versions.props`,
`eng/Version.Details.xml`, `eng/Version.Details.props`)

The multithreaded task APIs (`MSBuildMultiThreadableTaskAttribute`,
`IMultiThreadableTask`, `TaskEnvironment`, `AbsolutePath`;
dotnet/msbuild#12625) were added in **Microsoft.Build 18.4.0**; this
bumps all three central groups (source-build, net10.0, net472) to
**18.7.1**.

18.7.1's dependency closure requires `System.*` at **10.0.4+**. `main`
already flowed the core runtime `System.*`
(`System.Collections.Immutable`, `System.Text.Json`,
`System.Reflection.Metadata`, `System.Threading.Tasks.Dataflow`,
`System.Text.Encodings.Web`, `System.IO.Pipelines`,
`Microsoft.Bcl.AsyncInterfaces`, …) to **10.0.8** via #84402, which
already satisfies 18.7.1. This PR only needs to bring the packages that
still lagged to the same **10.0.8** band:
- **Peripheral darc-flowed `System.*`** that are pulled in only
transitively via MSBuild (`Version.Details.xml` +
`Version.Details.props`): `System.Configuration.ConfigurationManager`,
`System.Diagnostics.EventLog`,
`System.Security.Cryptography.ProtectedData`,
`System.Resources.Extensions`.
- **Hand-maintained literals:** `System.CodeDom` (`Packages.props`),
`System.Security.Cryptography.Pkcs`/`Xml` (`Versions.props`, both
source-build and non-source-build groups).

The net8.0 BuildHost is unaffected — it pins its own Microsoft.Build
version via `VersionOverride`/`PackageDownloadAndReference` (17.11.48,
the oldest version compatible with its NetCore TFM), so it does not
consume these central groups.

**2. Mark `ShowMessageForImplicitlySkipAnalyzers` with
`[MSBuildMultiThreadableTask]`**

Its `Execute()` only logs a message — no working directory, environment
variable, process, file I/O, or static-field usage — so the attribute
alone is sufficient; it does not need
`IMultiThreadableTask`/`TaskEnvironment`. All build flavors reference
18.7.1, so the attribute is applied unconditionally (no `#if`).

**3. Fix `ErrorLoggingEngine` for the 18.6+ assembly move**
(`TestUtilities/ErrorLoggerEngine.cs`)

The internal `Microsoft.Build.Shared.EventArgsFormatting` helper this
reflects into moved from `Microsoft.Build.dll` to
`Microsoft.Build.Framework.dll` in MSBuild 18.6+, so it now loads from
`Microsoft.Build.Framework.dll`.

## Validation

**Local (bootstrapped SDK against current main):**
- **Full solution restore: 0 errors, no NU1109** across the whole
`Roslyn.slnx`.
- `Microsoft.Build.Tasks.CodeAnalysis.UnitTests`: **net10.0 and net472
both green**, including `TargetTests.TestImplicitlySkipAnalyzers`
(previously MSB4062 without the attribute type) and
`VbcTests.CheckErrorAndWarningParsing` (exercises the
`EventArgsFormatting` reflection). Task + test assemblies build clean on
both TFMs with `TreatWarningsAsErrors`, and the net10.0 task assembly
carries `Microsoft.Build.Framework.MSBuildMultiThreadableTaskAttribute`.

**CI:** fully green — all 28 checks pass, including **Source-Build
(Managed)** (confirms 18.7.1 + the 10.0.8 band are available in the
source-build feed), all CoreClr/net10.0 test legs, VS integration, and
the Desktop test legs.

## Reviewer notes

- **darc file edits:** the four peripheral `System.*` packages are
aligned to 10.0.8 by editing `Version.Details.xml` +
`Version.Details.props` directly (they lagged at 10.0.1 because nothing
references them except transitively via MSBuild). This mirrors the
manual `System.*` alignment in #84262; flagging since it touches
darc-managed versions. They will be re-flowed on the next runtime
dependency update.
- **Source-build MSBuild bump:** this raises the `DotNetBuildSourceOnly`
group to 18.7.1; the CI **Source-Build (Managed)** leg (green) confirms
18.7.1 + the 10.0.8 band are available in the source-build feed.
- **Known-flaky legs:** the Desktop (.NET Framework)
`Test_Windows_Desktop_*` legs sometimes fail on unrelated
`Editor.CSharp`/`Razor`/`CodeStyle` host crashes; they passed on the
latest run.

## Not in this PR

`Csc` / `Vbc` are **not** migrated yet — they still source the compile
working directory from `Directory.GetCurrentDirectory()`
(`ManagedCompiler.CurrentDirectoryToUse`) and read
`Environment.GetEnvironmentVariable("LIB")` (`LibDirectoryToUse`), both
of which need real `TaskEnvironment` plumbing. This PR makes the 18.7.1
API available so that work can follow.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Joey Robichaud <jorobich@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants