Skip to content

Migrate C# and Visual Basic options to Unified Settings - #86026

Closed
matteo-prosperi wants to merge 46 commits into
dotnet:mainfrom
matteo-prosperi:dev/maprospe/usx
Closed

matteo-prosperi wants to merge 46 commits into
dotnet:mainfrom
matteo-prosperi:dev/maprospe/usx

Conversation

@matteo-prosperi

@matteo-prosperi matteo-prosperi commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Make Advanced and Code Style options available in Unified Settings without losing existing preferences or live language-service updates.

  • Preserve legacy profile migration, shared settings, nullable defaults, and localization.
  • Keep editable Naming rules, symbol specifications, and styles in readable, GUID-free settings.json.
  • Retain the General preview across inline groups and keep preview scrolling bounded.

This draft requires supporting Visual Studio settings APIs and shell behavior, plus a newer Microsoft.VisualStudio.Settings.Manifest.Build package: the pinned 18.12.1217 validator does not accept the new category properties.

Microsoft Reviewers: Open in CodeFlow

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

matteo-prosperi and others added 3 commits October 12, 2026 17:14
Bring Advanced, Code Style General, Naming, and C# Formatting options
into Unified Settings while preserving legacy migration and runtime
synchronization. Keep naming definitions readable and GUID-free, and
retain live previews across inline Code Style groups.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove obsolete access-key markers from localized option text and keep the existing translations marked as translated.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove the complete parenthesized accelerator suffix from East Asian translations instead of leaving the accelerator letter visible.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment thread eng/Packages.props Resolved
@matteo-prosperi
matteo-prosperi marked this pull request as ready for review October 13, 2026 15:57
@matteo-prosperi
matteo-prosperi requested review from a team as code owners October 13, 2026 15:57
Copilot AI balanced review requested due to automatic review settings October 13, 2026 15:57

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.

🟡 Changes recommended

The incompatible validator pin and Naming bootstrap race are merge-blocking correctness issues.

3 open findings
What changed in this PR

Migrates C# and Visual Basic options to Unified Settings while preserving legacy persistence, live updates, localization, previews, and editable naming configuration.

Changes:

  • Adds Advanced, Code Style, Formatting, and Naming manifests and supporting packages.
  • Adds bidirectional synchronization with legacy option stores.
  • Adds migration, validation, preview, localization, and regression tests.

Review findings: The validator package is incompatible with the manifests, Naming initialization can lose concurrent profile imports, and NativeNamingSettingsStore is unused by production.

File Description
eng/​Packages.props Pins the settings-manifest validator.
src/​VisualStudio/​Core/​Def/​Options/​*NamingSettings*.cs Implements Naming graph storage, migration, validation, and editing.
src/​VisualStudio/​Core/​Def/​Options/​INative*SettingsService.cs Defines synchronization service contracts.
src/​VisualStudio/​Core/​Def/​Options/​VisualStudioOptionPersisterProvider.cs Starts native/legacy synchronization services.
src/​VisualStudio/​Core/​Def/​UnifiedSettings/​roslynSettings.registration.json Registers shared Advanced settings.
src/​VisualStudio/​Core/​Impl/​Options/​Advanced/​* Synchronizes Advanced settings.
src/​VisualStudio/​Core/​Impl/​Options/​CodeStyle/​* Provides Code Style editing, synchronization, commands, and previews.
src/​VisualStudio/​Core/​Impl/​Options/​Naming/​* Hosts Naming services and runtime synchronization.
src/​VisualStudio/​CSharp/​Impl/​UnifiedSettings/​* Registers C# Advanced, Code Style, Formatting, and Naming experiences.
src/​VisualStudio/​VisualBasic/​Impl/​UnifiedSettings/​* Registers Visual Basic Advanced, Code Style, and Naming experiences.
src/​VisualStudio/​{CSharp,VisualBasic}/​Impl/​*Package* Activates the new settings packages and services.
src/​VisualStudio/​{Core,CSharp,VisualBasic}/​**/​*.csproj and *.vbproj Packages and validates manifests and resources.
src/​VisualStudio/​Setup/​source.extension.vsixmanifest Includes the new package assets.
src/​VisualStudio/​Core/​Test.Next/​UnifiedSettings/​*Tests.cs Tests manifests, migration, synchronization, naming, and previews.
src/​VisualStudio/​Core/​Test.Next/​Roslyn.VisualStudio.Next.UnitTests.csproj Includes Unified Settings test assets.
Changed *.resx and *.xlf files Updates localized labels and removes legacy access keys.

🧠 Review effort: Balanced

Comment thread eng/Packages.props Resolved
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 13, 2026 16:50

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.

🟡 Changes recommended

The configured validator contradicts the stated schema requirement, and shared resource edits regress classic option-page keyboard access.

6 open findings

🧠 Review effort: Balanced

Reset copied translations to new English placeholders while preserving existing accelerator cleanup.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 13, 2026 17:05

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.

Use full declarative migration for inheritance margin and Remove Unused References, treating legacy null as the enabled default. Retain the custom bridge only for registry logging.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 13, 2026 18:15

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.

🟡 Changes recommended

Existing unresolved findings include an unsupported manifest validator, a Naming synchronization race, and keyboard-accessibility regressions in classic option pages.

5 open findings
1 resolved since last review

🧠 Review effort: Balanced

Route diagnostic logging through the existing Unified Settings persister and full native registry migration. Remove the redundant Advanced synchronization service, registry watcher, and obsolete compatibility tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 13, 2026 18: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.

…zation

Use one settings package and manifest per language, with lazy Code Style preview providers and shared Naming callback/command registration. Query the component model asynchronously and compose startup MEF services on the thread pool. Update registrations, localization, inventories, and threading regression tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 20, 2026 20:46
Apply consistent two-space formatting to the C#, Visual Basic, and shared Advanced settings manifests without changing values, ordering, migrations, or comments.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

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.

🟡 Changes recommended

Two unresolved critical issues allow legacy preference loss and synchronization work to outlive a failed bootstrap.

2 open issues

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 20, 2026 20:55

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.

🔵 Needs a closer look

Cross-store migration and shell integration require human validation against the supporting Visual Studio APIs and compatible manifest validator.

2 open issues

Review effort: Balanced

Explain the asynchronous synchronization gate, legacy notification queue lock, cached values, and callback notification handling.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 20, 2026 21:05
matteo-prosperi and others added 3 commits October 20, 2026 14:16
Replace Newtonsoft.Json string conversions in the native settings synchronizer and its test helpers, preserving legacy XML serialization.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Explain pending edits and preservation of unchanged option values without storage jargon.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use Action<Exception> for retry reporting and wire explicit Code Style and Naming reporters while keeping task observers for asynchronous operations. Update retry and cancellation tests to inspect exceptions directly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

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.

🔵 Needs a closer look

Legacy-profile preservation remains unresolved, and cross-store synchronization requires human validation against the supporting Visual Studio APIs and shell behavior.

3 open issues

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 20, 2026 21:24
Rename the helper and test class, and use Serialize/Deserialize method names throughout without changing the storage representation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

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.

🔵 Needs a closer look

Cross-store migration and preview behavior need human integration validation against the required Visual Studio APIs, shell, and manifest tooling.

3 open issues

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 20, 2026 21:31

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.

matteo-prosperi and others added 2 commits October 20, 2026 16:19
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

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.

🔵 Needs a closer look

The migration requires human integration validation of supporting Visual Studio APIs, shell behavior, and manifest-validator compatibility.

1 open issue
2 resolved since last review

Review effort: Balanced

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

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.

🔵 Needs a closer look

Migration and preview behavior require end-to-end validation against the supporting Visual Studio APIs, shell behavior, and compatible manifest tooling.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Medium severity Code Style settings path skips legacy preference synchronization

src/​VisualStudio/​Core/​Impl/​Options/​UnifiedSettingsPackage.cs:72

Starting synchronization from the language packages fixes normal editing startup, but this separate settings-package initializer starts only Naming. If the user opens Code Style before the corresponding language package loads, existing legacy preferences have not been copied to the native scalars. Those scalars have no migration callbacks; for example, the field-qualification row can show its registered false/silent defaults instead of a saved true/warning preference. Keep the language-package startup and also ensure Code Style synchronization is initialized for this settings-only path before presenting editable values. Add C# and Visual Basic coverage with legacy customizations and neither language package loaded.

1 resolved since last review

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants