Skip to content

Commit f8893e8

Browse files
author
Andrew Hall
authored
Fix unified settings (#10607)
While self-hosting I noticed unified settings were no longer available and were defaulting back to the classic experience. Looks like they updated how some of the registration works and added a fix for f5 debugging them. Worked locally on my machine but I will not claim any expertise here.
1 parent fda387e commit f8893e8

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/Razor/src/Microsoft.VisualStudio.RazorExtension/Microsoft.VisualStudio.RazorExtension.Custom.pkgdef

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,10 @@
7474
"Value"=dword:00000000
7575
"Title"="Force use of runtime code generation for Razor (requires restart)"
7676
"PreviewPaneChannels"="IntPreview,int.main"
77+
78+
// CacheTag value should be changed when registration file changes
79+
// See https://devdiv.visualstudio.com/DevDiv/_wiki/wikis/DevDiv.wiki/39345/Manifest-Build-Deployment-and-Setup-Authoring-In-Depth?anchor=example-pkgdef-key for more infomation
80+
[$RootKey$\SettingsManifests\{13b72f58-279e-49e0-a56d-296be02f0805}]
81+
@="Microsoft.VisualStudio.RazorExtension.RazorPackage"
82+
"ManifestPath"="$PackageFolder$\UnifiedSettings\razor.registration.json"
83+
"CacheTag"=qword:5DE8496A8900B809

src/Razor/src/Microsoft.VisualStudio.RazorExtension/RazorPackage.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ namespace Microsoft.VisualStudio.RazorExtension;
3434
[ProvideMenuResource("SyntaxVisualizerMenu.ctmenu", 1)]
3535
[ProvideToolWindow(typeof(SyntaxVisualizerToolWindow))]
3636
[ProvideLanguageEditorOptionPage(typeof(AdvancedOptionPage), RazorConstants.RazorLSPContentTypeName, category: null, "Advanced", pageNameResourceId: "#1050", keywordListResourceId: 1060)]
37+
[ProvideSettingsManifest(PackageRelativeManifestFile = @"UnifiedSettings\razor.registration.json")]
3738
[Guid(PackageGuidString)]
3839
// We activate cohosting when the first Razor file is opened. This matches the previous behavior where the
3940
// LSP client MEF export had the Razor content type metadata.

0 commit comments

Comments
 (0)