Skip to content

Commit 900a62a

Browse files
authored
Use ProvideSettingsManifest to specify Unfied Settings registration file (#72429)
* Update versions * Rename registration.json and add ProvideSettingsManifest * Add name * fix test * Fix name * Clean * Add an entry in pkgdef * Add comment * Change csproj * Fix source build * Remove blank line * Add comment * Fix typo
1 parent ad878cc commit 900a62a

10 files changed

+40
-17
lines changed

eng/Directory.Packages.props

+15-15
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@
4343
</ItemGroup>
4444

4545
<ItemGroup Condition="'$(DotnetBuildFromSource)' != 'true' and '$(TargetFramework)' == 'net472'">
46-
<PackageVersion Include="Microsoft.Build" Version="17.9.0-preview-23551-05" />
47-
<PackageVersion Include="Microsoft.Build.Framework" Version="17.9.0-preview-23551-05" />
48-
<PackageVersion Include="Microsoft.Build.Tasks.Core" Version="17.9.0-preview-23551-05" />
46+
<PackageVersion Include="Microsoft.Build" Version="17.10.0-preview-24081-01" />
47+
<PackageVersion Include="Microsoft.Build.Framework" Version="17.10.0-preview-24081-01" />
48+
<PackageVersion Include="Microsoft.Build.Tasks.Core" Version="17.10.0-preview-24081-01" />
4949
</ItemGroup>
5050

5151
<ItemGroup>
@@ -88,32 +88,32 @@
8888
<!--
8989
Subset of Microsoft.VisualStudio.Sdk meta-package (run `csi generate-vssdk-versions.csx` to update based on VSSDK meta-package).
9090
-->
91-
<PackageVersion Include="Microsoft.VisualStudio.Composition" Version="17.7.29" />
91+
<PackageVersion Include="Microsoft.VisualStudio.Composition" Version="17.10.11-preview" />
9292
<PackageVersion Include="Microsoft.VisualStudio.CoreUtility" Version="17.9.80-preview" />
9393
<PackageVersion Include="Microsoft.VisualStudio.Editor" Version="17.9.80-preview" />
94-
<PackageVersion Include="Microsoft.VisualStudio.ImageCatalog" Version="17.9.35796-preview.1" />
95-
<PackageVersion Include="Microsoft.VisualStudio.Imaging.Interop.14.0.DesignTime" Version="17.9.35796-preview.1" />
94+
<PackageVersion Include="Microsoft.VisualStudio.ImageCatalog" Version="17.10.639-preview.1" />
95+
<PackageVersion Include="Microsoft.VisualStudio.Imaging.Interop.14.0.DesignTime" Version="17.10.616-preview.1" />
9696
<PackageVersion Include="Microsoft.VisualStudio.Language.NavigateTo.Interfaces" Version="17.9.80-preview" />
9797
<PackageVersion Include="Microsoft.VisualStudio.LanguageServer.Client" Version="17.9.25-preview" />
9898
<PackageVersion Include="Microsoft.VisualStudio.Language.StandardClassification" Version="17.9.80-preview" />
9999
<PackageVersion Include="Microsoft.VisualStudio.Language" Version="17.9.80-preview" />
100100
<PackageVersion Include="Microsoft.VisualStudio.RemoteControl" Version="16.3.52" />
101-
<PackageVersion Include="Microsoft.VisualStudio.RpcContracts" Version="17.9.5-alpha" />
102-
<PackageVersion Include="Microsoft.VisualStudio.Shell.15.0" Version="17.9.35796-preview.1" />
103-
<PackageVersion Include="Microsoft.VisualStudio.Telemetry" Version="17.9.13" />
101+
<PackageVersion Include="Microsoft.VisualStudio.RpcContracts" Version="17.10.3-preview" />
102+
<PackageVersion Include="Microsoft.VisualStudio.Shell.15.0" Version="17.10.639-preview.1" />
103+
<PackageVersion Include="Microsoft.VisualStudio.Telemetry" Version="17.10.4" />
104104
<PackageVersion Include="Microsoft.VisualStudio.Text.Data" Version="17.9.80-preview" />
105105
<PackageVersion Include="Microsoft.VisualStudio.Text.Logic" Version="17.9.80-preview" />
106106
<PackageVersion Include="Microsoft.VisualStudio.Text.UI" Version="17.9.80-preview" />
107107
<PackageVersion Include="Microsoft.VisualStudio.Text.UI.Wpf" Version="17.9.80-preview" />
108-
<PackageVersion Include="Microsoft.VisualStudio.Threading" Version="17.9.3-alpha" />
108+
<PackageVersion Include="Microsoft.VisualStudio.Threading" Version="17.10.12-preview" />
109109
<PackageVersion Include="Microsoft.VisualStudio.Utilities.Internal" Version="16.3.56" />
110110
<PackageVersion Include="Nerdbank.Streams" Version="2.10.69" />
111111
<PackageVersion Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
112-
<PackageVersion Include="StreamJsonRpc" Version="2.17.9" />
112+
<PackageVersion Include="StreamJsonRpc" Version="2.18.6-preview" />
113113

114114
<!-- TODO: workaround for https://github.com/dotnet/roslyn/issues/71377 -->
115115
<PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.10.12-preview" />
116-
<PackageVersion Include="Microsoft.VisualStudio.Composition.Analyzers" Version="17.7.40" />
116+
<PackageVersion Include="Microsoft.VisualStudio.Composition.Analyzers" Version="17.10.11-preview" />
117117
<PackageVersion Include="Microsoft.ServiceHub.Framework" Version="4.4.22"/>
118118

119119
<!--
@@ -188,7 +188,7 @@
188188
<PackageVersion Include="System.CommandLine" Version="$(SystemCommandLineVersion)" />
189189
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="$(SystemConfigurationConfigurationManagerVersion)" />
190190
<PackageVersion Include="System.Composition" Version="$(SystemCompositionVersion)" />
191-
<PackageVersion Include="System.ComponentModel.Composition" Version="7.0.0" />
191+
<PackageVersion Include="System.ComponentModel.Composition" Version="8.0.0" />
192192
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="$(SystemDiagnosticsDiagnosticSourceVersion)" />
193193
<PackageVersion Include="System.Diagnostics.EventLog" Version="$(SystemDiagnosticsEventLogVersion)" />
194194
<PackageVersion Include="System.IO.Hashing" Version="8.0.0" />
@@ -198,13 +198,13 @@
198198
<PackageVersion Include="System.Numerics.Vectors" Version="4.5.0" />
199199
<PackageVersion Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
200200
<PackageVersion Include="System.Runtime.Loader" Version="4.3.0" />
201-
<PackageVersion Include="System.Resources.Extensions" Version="7.0.0" />
201+
<PackageVersion Include="System.Resources.Extensions" Version="$(SystemResourcesExtensionsVersion)" />
202202
<PackageVersion Include="System.Security.Cryptography.ProtectedData" Version="$(SystemSecurityCryptographyProtectedDataVersion)" />
203203
<PackageVersion Include="System.Security.Permissions" Version="$(SystemSecurityPermissionsVersion)" />
204204
<PackageVersion Include="System.Security.Principal" Version="4.3.0" />
205205
<PackageVersion Include="System.Text.Encoding.CodePages" Version="7.0.0" />
206206
<PackageVersion Include="System.Text.Encoding.Extensions" Version="4.3.0" />
207-
<PackageVersion Include="System.Threading.Tasks.Dataflow" Version="7.0.0" />
207+
<PackageVersion Include="System.Threading.Tasks.Dataflow" Version="8.0.0" />
208208
<PackageVersion Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
209209
<PackageVersion Include="System.Windows.Extensions" Version="$(SystemWindowsExtensionsVersion)" />
210210

eng/SourceBuildPrebuiltBaseline.xml

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
<UsagePattern IdentityGlob="System.Configuration.ConfigurationManager/8.0*" />
3333
<UsagePattern IdentityGlob="System.Diagnostics.DiagnosticSource/8.0*" />
3434
<UsagePattern IdentityGlob="System.Diagnostics.EventLog/8.0*" />
35+
<UsagePattern IdentityGlob="System.Resources.Extensions/8.0*" />
3536
<UsagePattern IdentityGlob="System.Security.Cryptography.ProtectedData/8.0*" />
3637
<UsagePattern IdentityGlob="System.Security.Permissions/8.0*" />
3738
<UsagePattern IdentityGlob="System.Text.Encodings.Web/8.0*" />

eng/Version.Details.xml

+4
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@
7272
<Uri>https://github.com/dotnet/runtime</Uri>
7373
<Sha>5535e31a712343a63f5d7d796cd874e563e5ac14</Sha>
7474
</Dependency>
75+
<Dependency Name="System.Resources.Extensions" Version="8.0.0">
76+
<Uri>https://github.com/dotnet/runtime</Uri>
77+
<Sha>5535e31a712343a63f5d7d796cd874e563e5ac14</Sha>
78+
</Dependency>
7579
<Dependency Name="System.Text.Encodings.Web" Version="8.0.0">
7680
<Uri>https://github.com/dotnet/runtime</Uri>
7781
<Sha>5535e31a712343a63f5d7d796cd874e563e5ac14</Sha>

eng/Versions.props

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
<SystemDiagnosticsDiagnosticSourceVersion>8.0.0</SystemDiagnosticsDiagnosticSourceVersion>
2929
<SystemIOPipelinesVersion>8.0.0</SystemIOPipelinesVersion>
3030
<SystemReflectionMetadataVersion>8.0.0</SystemReflectionMetadataVersion>
31+
<SystemResourcesExtensionsVersion>8.0.0</SystemResourcesExtensionsVersion>
3132
<SystemSecurityCryptographyProtectedDataVersion>8.0.0</SystemSecurityCryptographyProtectedDataVersion>
3233
<SystemSecurityPermissionsVersion>8.0.0</SystemSecurityPermissionsVersion>
3334
<!-- Note: When updating SystemTextJsonVersion ensure that the version is no higher than what is used by MSBuild. -->

src/EditorFeatures/TestUtilities/StubSettingsManagerHost.cs

+6-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Task<Stream> ISettingsManagerHost5.GetServiceStreamAsync(string serviceMoniker,
8383
throw new NotImplementedException();
8484
}
8585

86-
private sealed class StringStorage : IStringStorage, IAsyncStringStorage
86+
private sealed class StringStorage : IStringStorage2, IAsyncStringStorage
8787
{
8888
private ImmutableDictionary<string, VersionedString> _values = ImmutableDictionary<string, VersionedString>.Empty;
8989
private PropertyChangedEventHandler? _propertyChanged;
@@ -179,5 +179,10 @@ Task<ServiceUploadResult> IAsyncStringStorage.SetAsync(NamedVersionedString valu
179179
{
180180
throw new NotImplementedException();
181181
}
182+
183+
void IStringStorage2.ForEachSettingNameStartingWith(string prefix, CharSpanProcessorDelegate processFunc)
184+
{
185+
throw new NotImplementedException();
186+
}
182187
}
183188
}

src/VisualStudio/CSharp/Impl/CSharpPackage.cs

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ namespace Microsoft.VisualStudio.LanguageServices.CSharp.LanguageService
5353
[ProvideLanguageEditorOptionPage(typeof(Options.Formatting.FormattingSpacingPage), "CSharp", @"Code Style\Formatting", "Spacing", pageNameResourceId: "#112", keywordListResourceId: 310)]
5454
[ProvideLanguageEditorOptionPage(typeof(Options.NamingStylesOptionPage), "CSharp", @"Code Style", "Naming", pageNameResourceId: "#115", keywordListResourceId: 314)]
5555
[ProvideLanguageEditorOptionPage(typeof(Options.IntelliSenseOptionPage), "CSharp", null, "IntelliSense", pageNameResourceId: "#103", keywordListResourceId: 312)]
56+
[ProvideSettingsManifest(PackageRelativeManifestFile = @"UnifiedSettings\csharpSettings.registration.json")]
5657
[Guid(Guids.CSharpPackageIdString)]
5758
internal sealed class CSharpPackage : AbstractPackage<CSharpPackage, CSharpLanguageService>, IVsUserSettingsQuery
5859
{

src/VisualStudio/CSharp/Impl/Microsoft.VisualStudio.LanguageServices.CSharp.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
</PropertyGroup>
1919
<ItemGroup>
2020
<Content Update=".vsextension/string-resources.json" XlfPreserveFileName="true" />
21+
<Content Include="UnifiedSettings/csharpSettings.registration.json" IncludeInVSIX="true" CopyToOutputDirectory="PreserveNewest" />
2122
</ItemGroup>
2223
<ItemGroup Label="PkgDef">
2324
<PkgDefInstalledProduct Include="{13c3bbb4-f18f-4111-9f54-a0fb010d9194}" Name="Microsoft Visual C#" DisplayName="#116" ProductDetails="#117" />

src/VisualStudio/CSharp/Impl/PackageRegistration.pkgdef

+7
Original file line numberDiff line numberDiff line change
@@ -192,3 +192,10 @@
192192
"Package"="{13C3BBB4-F18F-4111-9F54-A0FB010D9194}"
193193
"SortPriority"=dword:00000064
194194
@="Microsoft Visual C#"
195+
196+
// CacheTag value should be changed when registration file changes
197+
// 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
198+
[$RootKey$\SettingsManifests\{13c3bbb4-f18f-4111-9f54-a0fb010d9194}]
199+
@="Microsoft.VisualStudio.LanguageServices.CSharp.LanguageService.CSharpPackage"
200+
"ManifestPath"="$PackageFolder$\UnifiedSettings\csharpSettings.registration.json"
201+
"CacheTag"=qword:08DC1824DFE0117B

src/VisualStudio/Setup/UnifiedSettings/csharpIntellisenseSettings.registration.json src/VisualStudio/CSharp/Impl/UnifiedSettings/csharpSettings.registration.json

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// NOTE:
2+
// When this file is changed. Please also update the cache tag under settings entry in src/VisualStudio/CSharp/Impl/PackageRegistration.pkgdef
3+
// Otherwise your change might be ignored.
4+
// 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 details
15
{
26
"properties": {
37
// CompletionOptionsStorage.TriggerOnTypingLetters

src/VisualStudio/Setup/Roslyn.VisualStudio.Setup.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,6 @@
347347
<IncludeInVSIX>true</IncludeInVSIX>
348348
<Visible>false</Visible>
349349
</Content>
350-
<Content Include="UnifiedSettings\*.registration.json" IncludeInVSIX="true" />
351350
</ItemGroup>
352351
<ItemGroup>
353352
<None Include="source.extension.vsixmanifest">

0 commit comments

Comments
 (0)