Skip to content

Commit

Permalink
Use ProvideSettingsManifest to specify Unfied Settings registration f…
Browse files Browse the repository at this point in the history
…ile (#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
  • Loading branch information
Cosifne authored Mar 13, 2024
1 parent ad878cc commit 900a62a
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 17 deletions.
30 changes: 15 additions & 15 deletions eng/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
</ItemGroup>

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

<ItemGroup>
Expand Down Expand Up @@ -88,32 +88,32 @@
<!--
Subset of Microsoft.VisualStudio.Sdk meta-package (run `csi generate-vssdk-versions.csx` to update based on VSSDK meta-package).
-->
<PackageVersion Include="Microsoft.VisualStudio.Composition" Version="17.7.29" />
<PackageVersion Include="Microsoft.VisualStudio.Composition" Version="17.10.11-preview" />
<PackageVersion Include="Microsoft.VisualStudio.CoreUtility" Version="17.9.80-preview" />
<PackageVersion Include="Microsoft.VisualStudio.Editor" Version="17.9.80-preview" />
<PackageVersion Include="Microsoft.VisualStudio.ImageCatalog" Version="17.9.35796-preview.1" />
<PackageVersion Include="Microsoft.VisualStudio.Imaging.Interop.14.0.DesignTime" Version="17.9.35796-preview.1" />
<PackageVersion Include="Microsoft.VisualStudio.ImageCatalog" Version="17.10.639-preview.1" />
<PackageVersion Include="Microsoft.VisualStudio.Imaging.Interop.14.0.DesignTime" Version="17.10.616-preview.1" />
<PackageVersion Include="Microsoft.VisualStudio.Language.NavigateTo.Interfaces" Version="17.9.80-preview" />
<PackageVersion Include="Microsoft.VisualStudio.LanguageServer.Client" Version="17.9.25-preview" />
<PackageVersion Include="Microsoft.VisualStudio.Language.StandardClassification" Version="17.9.80-preview" />
<PackageVersion Include="Microsoft.VisualStudio.Language" Version="17.9.80-preview" />
<PackageVersion Include="Microsoft.VisualStudio.RemoteControl" Version="16.3.52" />
<PackageVersion Include="Microsoft.VisualStudio.RpcContracts" Version="17.9.5-alpha" />
<PackageVersion Include="Microsoft.VisualStudio.Shell.15.0" Version="17.9.35796-preview.1" />
<PackageVersion Include="Microsoft.VisualStudio.Telemetry" Version="17.9.13" />
<PackageVersion Include="Microsoft.VisualStudio.RpcContracts" Version="17.10.3-preview" />
<PackageVersion Include="Microsoft.VisualStudio.Shell.15.0" Version="17.10.639-preview.1" />
<PackageVersion Include="Microsoft.VisualStudio.Telemetry" Version="17.10.4" />
<PackageVersion Include="Microsoft.VisualStudio.Text.Data" Version="17.9.80-preview" />
<PackageVersion Include="Microsoft.VisualStudio.Text.Logic" Version="17.9.80-preview" />
<PackageVersion Include="Microsoft.VisualStudio.Text.UI" Version="17.9.80-preview" />
<PackageVersion Include="Microsoft.VisualStudio.Text.UI.Wpf" Version="17.9.80-preview" />
<PackageVersion Include="Microsoft.VisualStudio.Threading" Version="17.9.3-alpha" />
<PackageVersion Include="Microsoft.VisualStudio.Threading" Version="17.10.12-preview" />
<PackageVersion Include="Microsoft.VisualStudio.Utilities.Internal" Version="16.3.56" />
<PackageVersion Include="Nerdbank.Streams" Version="2.10.69" />
<PackageVersion Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
<PackageVersion Include="StreamJsonRpc" Version="2.17.9" />
<PackageVersion Include="StreamJsonRpc" Version="2.18.6-preview" />

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

<!--
Expand Down Expand Up @@ -188,7 +188,7 @@
<PackageVersion Include="System.CommandLine" Version="$(SystemCommandLineVersion)" />
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="$(SystemConfigurationConfigurationManagerVersion)" />
<PackageVersion Include="System.Composition" Version="$(SystemCompositionVersion)" />
<PackageVersion Include="System.ComponentModel.Composition" Version="7.0.0" />
<PackageVersion Include="System.ComponentModel.Composition" Version="8.0.0" />
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="$(SystemDiagnosticsDiagnosticSourceVersion)" />
<PackageVersion Include="System.Diagnostics.EventLog" Version="$(SystemDiagnosticsEventLogVersion)" />
<PackageVersion Include="System.IO.Hashing" Version="8.0.0" />
Expand All @@ -198,13 +198,13 @@
<PackageVersion Include="System.Numerics.Vectors" Version="4.5.0" />
<PackageVersion Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
<PackageVersion Include="System.Runtime.Loader" Version="4.3.0" />
<PackageVersion Include="System.Resources.Extensions" Version="7.0.0" />
<PackageVersion Include="System.Resources.Extensions" Version="$(SystemResourcesExtensionsVersion)" />
<PackageVersion Include="System.Security.Cryptography.ProtectedData" Version="$(SystemSecurityCryptographyProtectedDataVersion)" />
<PackageVersion Include="System.Security.Permissions" Version="$(SystemSecurityPermissionsVersion)" />
<PackageVersion Include="System.Security.Principal" Version="4.3.0" />
<PackageVersion Include="System.Text.Encoding.CodePages" Version="7.0.0" />
<PackageVersion Include="System.Text.Encoding.Extensions" Version="4.3.0" />
<PackageVersion Include="System.Threading.Tasks.Dataflow" Version="7.0.0" />
<PackageVersion Include="System.Threading.Tasks.Dataflow" Version="8.0.0" />
<PackageVersion Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<PackageVersion Include="System.Windows.Extensions" Version="$(SystemWindowsExtensionsVersion)" />

Expand Down
1 change: 1 addition & 0 deletions eng/SourceBuildPrebuiltBaseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<UsagePattern IdentityGlob="System.Configuration.ConfigurationManager/8.0*" />
<UsagePattern IdentityGlob="System.Diagnostics.DiagnosticSource/8.0*" />
<UsagePattern IdentityGlob="System.Diagnostics.EventLog/8.0*" />
<UsagePattern IdentityGlob="System.Resources.Extensions/8.0*" />
<UsagePattern IdentityGlob="System.Security.Cryptography.ProtectedData/8.0*" />
<UsagePattern IdentityGlob="System.Security.Permissions/8.0*" />
<UsagePattern IdentityGlob="System.Text.Encodings.Web/8.0*" />
Expand Down
4 changes: 4 additions & 0 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>5535e31a712343a63f5d7d796cd874e563e5ac14</Sha>
</Dependency>
<Dependency Name="System.Resources.Extensions" Version="8.0.0">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>5535e31a712343a63f5d7d796cd874e563e5ac14</Sha>
</Dependency>
<Dependency Name="System.Text.Encodings.Web" Version="8.0.0">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>5535e31a712343a63f5d7d796cd874e563e5ac14</Sha>
Expand Down
1 change: 1 addition & 0 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<SystemDiagnosticsDiagnosticSourceVersion>8.0.0</SystemDiagnosticsDiagnosticSourceVersion>
<SystemIOPipelinesVersion>8.0.0</SystemIOPipelinesVersion>
<SystemReflectionMetadataVersion>8.0.0</SystemReflectionMetadataVersion>
<SystemResourcesExtensionsVersion>8.0.0</SystemResourcesExtensionsVersion>
<SystemSecurityCryptographyProtectedDataVersion>8.0.0</SystemSecurityCryptographyProtectedDataVersion>
<SystemSecurityPermissionsVersion>8.0.0</SystemSecurityPermissionsVersion>
<!-- Note: When updating SystemTextJsonVersion ensure that the version is no higher than what is used by MSBuild. -->
Expand Down
7 changes: 6 additions & 1 deletion src/EditorFeatures/TestUtilities/StubSettingsManagerHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Task<Stream> ISettingsManagerHost5.GetServiceStreamAsync(string serviceMoniker,
throw new NotImplementedException();
}

private sealed class StringStorage : IStringStorage, IAsyncStringStorage
private sealed class StringStorage : IStringStorage2, IAsyncStringStorage
{
private ImmutableDictionary<string, VersionedString> _values = ImmutableDictionary<string, VersionedString>.Empty;
private PropertyChangedEventHandler? _propertyChanged;
Expand Down Expand Up @@ -179,5 +179,10 @@ Task<ServiceUploadResult> IAsyncStringStorage.SetAsync(NamedVersionedString valu
{
throw new NotImplementedException();
}

void IStringStorage2.ForEachSettingNameStartingWith(string prefix, CharSpanProcessorDelegate processFunc)
{
throw new NotImplementedException();
}
}
}
1 change: 1 addition & 0 deletions src/VisualStudio/CSharp/Impl/CSharpPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ namespace Microsoft.VisualStudio.LanguageServices.CSharp.LanguageService
[ProvideLanguageEditorOptionPage(typeof(Options.Formatting.FormattingSpacingPage), "CSharp", @"Code Style\Formatting", "Spacing", pageNameResourceId: "#112", keywordListResourceId: 310)]
[ProvideLanguageEditorOptionPage(typeof(Options.NamingStylesOptionPage), "CSharp", @"Code Style", "Naming", pageNameResourceId: "#115", keywordListResourceId: 314)]
[ProvideLanguageEditorOptionPage(typeof(Options.IntelliSenseOptionPage), "CSharp", null, "IntelliSense", pageNameResourceId: "#103", keywordListResourceId: 312)]
[ProvideSettingsManifest(PackageRelativeManifestFile = @"UnifiedSettings\csharpSettings.registration.json")]
[Guid(Guids.CSharpPackageIdString)]
internal sealed class CSharpPackage : AbstractPackage<CSharpPackage, CSharpLanguageService>, IVsUserSettingsQuery
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
</PropertyGroup>
<ItemGroup>
<Content Update=".vsextension/string-resources.json" XlfPreserveFileName="true" />
<Content Include="UnifiedSettings/csharpSettings.registration.json" IncludeInVSIX="true" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<ItemGroup Label="PkgDef">
<PkgDefInstalledProduct Include="{13c3bbb4-f18f-4111-9f54-a0fb010d9194}" Name="Microsoft Visual C#" DisplayName="#116" ProductDetails="#117" />
Expand Down
7 changes: 7 additions & 0 deletions src/VisualStudio/CSharp/Impl/PackageRegistration.pkgdef
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,10 @@
"Package"="{13C3BBB4-F18F-4111-9F54-A0FB010D9194}"
"SortPriority"=dword:00000064
@="Microsoft Visual C#"

// CacheTag value should be changed when registration file changes
// 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
[$RootKey$\SettingsManifests\{13c3bbb4-f18f-4111-9f54-a0fb010d9194}]
@="Microsoft.VisualStudio.LanguageServices.CSharp.LanguageService.CSharpPackage"
"ManifestPath"="$PackageFolder$\UnifiedSettings\csharpSettings.registration.json"
"CacheTag"=qword:08DC1824DFE0117B
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// NOTE:
// When this file is changed. Please also update the cache tag under settings entry in src/VisualStudio/CSharp/Impl/PackageRegistration.pkgdef
// Otherwise your change might be ignored.
// 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
{
"properties": {
// CompletionOptionsStorage.TriggerOnTypingLetters
Expand Down
1 change: 0 additions & 1 deletion src/VisualStudio/Setup/Roslyn.VisualStudio.Setup.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,6 @@
<IncludeInVSIX>true</IncludeInVSIX>
<Visible>false</Visible>
</Content>
<Content Include="UnifiedSettings\*.registration.json" IncludeInVSIX="true" />
</ItemGroup>
<ItemGroup>
<None Include="source.extension.vsixmanifest">
Expand Down

0 comments on commit 900a62a

Please sign in to comment.