Skip to content

Conversation

@tmat
Copy link
Member

@tmat tmat commented Dec 11, 2024

The serializer is required when saving naming style preferences specified in Tools > Options to solution fallback options. The option was throwing NotSupportedException, which was reported via NFW but for some reason does not appear in telemetry data (TBD why).

In order to preserve ordering of the naming style rules as specified in Tools > Options settings we introduce a new editor option dotnet_naming_rule.{rule-name}.priority. The highest priority is 0, which is the default. When saving VS options we generate priorities 0..N-1 where N is the number of rules. This causes VS option order to be preserved when the preferences are deserialized from fallback options.

Note that if any naming style is set in .editorconfig file, all naming style settings in VS options are ignored. This behavior is consistent with VS 2019.

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2297536

@tmat tmat requested a review from a team as a code owner December 11, 2024 18:24
@ghost ghost added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Dec 11, 2024
@arunchndr arunchndr enabled auto-merge December 11, 2024 20:55
@tmat tmat force-pushed the NamingStylePrefs17.12 branch from a3680ce to d144829 Compare December 11, 2024 22:37
@arunchndr arunchndr merged commit 9df7d00 into dotnet:release/dev17.12 Dec 12, 2024
22 of 25 checks passed
@tmat tmat deleted the NamingStylePrefs17.12 branch December 12, 2024 00:56
@tmat tmat added this to the 17.12 milestone Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead VSCode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants