diff --git a/New_Extensibility_Model/Samples/SettingsSample/.vsextension/string-resources.json b/New_Extensibility_Model/Samples/SettingsSample/.vsextension/string-resources.json
new file mode 100644
index 00000000..46593c69
--- /dev/null
+++ b/New_Extensibility_Model/Samples/SettingsSample/.vsextension/string-resources.json
@@ -0,0 +1,14 @@
+{
+ "SettingsSample.MyToolWindowCommand.DisplayName": "Sample Text Tool Window",
+ "SettingsSample.Settings.Category.DisplayName": "Settings Sample",
+ "SettingsSample.Settings.Category.Description": "Settings for the LoremIpsum sample generator.",
+ "SettingsSample.Settings.AutoUpdate.DisplayName": "Auto Update",
+ "SettingsSample.Settings.AutoUpdate.Description": "Whether to update the sample text when a setting changes.",
+ "SettingsSample.Settings.TextLength.DisplayName": "Text Length",
+ "SettingsSample.Settings.TextLength.Description": "Number of characters to include in the generated text.",
+ "SettingsSample.Settings.QuoteStyle.DisplayName": "Quote Style",
+ "SettingsSample.Settings.QuoteStyle.Description": "Style of quotes to enclose the generated text.",
+ "SettingsSample.Settings.QuoteStyle.None": "None",
+ "SettingsSample.Settings.QuoteStyle.Single": "Single",
+ "SettingsSample.Settings.QuoteStyle.Double": "Double"
+}
\ No newline at end of file
diff --git a/New_Extensibility_Model/Samples/SettingsSample/MyToolWindow.cs b/New_Extensibility_Model/Samples/SettingsSample/MyToolWindow.cs
new file mode 100644
index 00000000..c7cb157a
--- /dev/null
+++ b/New_Extensibility_Model/Samples/SettingsSample/MyToolWindow.cs
@@ -0,0 +1,49 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+namespace SettingsSample;
+
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.VisualStudio.Extensibility;
+using Microsoft.VisualStudio.Extensibility.Commands;
+using Microsoft.VisualStudio.Extensibility.ToolWindows;
+using Microsoft.VisualStudio.RpcContracts.RemoteUI;
+
+///
+/// A sample tool window.
+///
+[VisualStudioContribution]
+public class MyToolWindow : ToolWindow
+{
+ private object? dataContext;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public MyToolWindow()
+ {
+ this.Title = "Settings Sample Tool Window";
+ }
+
+ ///
+ public override ToolWindowConfiguration ToolWindowConfiguration => new()
+ {
+ Placement = ToolWindowPlacement.DocumentWell,
+ AllowAutoCreation = false,
+ };
+
+ ///
+ public override Task InitializeAsync(CancellationToken cancellationToken)
+ {
+ this.dataContext = new MyToolWindowData(this.Extensibility);
+
+ return Task.CompletedTask;
+ }
+
+ ///
+ public override Task GetContentAsync(CancellationToken cancellationToken)
+ {
+ return Task.FromResult(new MyToolWindowControl(this.dataContext));
+ }
+}
diff --git a/New_Extensibility_Model/Samples/SettingsSample/MyToolWindowCommand.cs b/New_Extensibility_Model/Samples/SettingsSample/MyToolWindowCommand.cs
new file mode 100644
index 00000000..2ca4cf54
--- /dev/null
+++ b/New_Extensibility_Model/Samples/SettingsSample/MyToolWindowCommand.cs
@@ -0,0 +1,29 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+namespace SettingsSample;
+
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.VisualStudio.Extensibility;
+using Microsoft.VisualStudio.Extensibility.Commands;
+
+///
+/// A sample command for showing a tool window.
+///
+[VisualStudioContribution]
+public class MyToolWindowCommand : Command
+{
+ ///
+ public override CommandConfiguration CommandConfiguration => new("%SettingsSample.MyToolWindowCommand.DisplayName%")
+ {
+ Placements = [CommandPlacement.KnownPlacements.ToolsMenu],
+ Icon = new(ImageMoniker.KnownValues.ToolWindow, IconSettings.IconAndText),
+ };
+
+ ///
+ public override async Task ExecuteCommandAsync(IClientContext context, CancellationToken cancellationToken)
+ {
+ await this.Extensibility.Shell().ShowToolWindowAsync(activate: true, cancellationToken);
+ }
+}
diff --git a/New_Extensibility_Model/Samples/SettingsSample/MyToolWindowControl.cs b/New_Extensibility_Model/Samples/SettingsSample/MyToolWindowControl.cs
new file mode 100644
index 00000000..31d79e2e
--- /dev/null
+++ b/New_Extensibility_Model/Samples/SettingsSample/MyToolWindowControl.cs
@@ -0,0 +1,28 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+namespace SettingsSample;
+
+using System.Threading;
+using Microsoft.VisualStudio.Extensibility.UI;
+
+///
+/// A sample remote user control to use as tool window UI content.
+///
+internal class MyToolWindowControl : RemoteUserControl
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ /// Data context of the remote control which can be referenced from xaml through data binding.
+ ///
+ ///
+ /// Optional synchronizationContext that the extender can provide to ensure that
+ /// are executed and properties are read and updated from the extension main thread.
+ ///
+ public MyToolWindowControl(object? dataContext, SynchronizationContext? synchronizationContext = null)
+ : base(dataContext, synchronizationContext)
+ {
+ }
+}
diff --git a/New_Extensibility_Model/Samples/SettingsSample/MyToolWindowControl.xaml b/New_Extensibility_Model/Samples/SettingsSample/MyToolWindowControl.xaml
new file mode 100644
index 00000000..fc320a67
--- /dev/null
+++ b/New_Extensibility_Model/Samples/SettingsSample/MyToolWindowControl.xaml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/New_Extensibility_Model/Samples/SettingsSample/MyToolWindowData.cs b/New_Extensibility_Model/Samples/SettingsSample/MyToolWindowData.cs
new file mode 100644
index 00000000..43227b31
--- /dev/null
+++ b/New_Extensibility_Model/Samples/SettingsSample/MyToolWindowData.cs
@@ -0,0 +1,131 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+namespace SettingsSample;
+
+using System;
+using System.Runtime.Serialization;
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft;
+using Microsoft.VisualStudio.Extensibility;
+using Microsoft.VisualStudio.Extensibility.Settings;
+using Microsoft.VisualStudio.Extensibility.UI;
+using Microsoft.VisualStudio.Threading;
+
+///
+/// A sample data context object to use with tool window UI content.
+///
+[DataContract]
+internal class MyToolWindowData : NotifyPropertyChangedObject
+{
+ internal static readonly string LoremIpsumText = """
+ Lorem ipsum dolor sit amet consectetur adipiscing elit dignissim lacinia donec,
+ praesent diam ac mattis morbi nisi dictum dapibus. Convallis natoque interdum
+ curabitur malesuada tellus aliquam dignissim hendrerit tempor, primis sem nulla
+ neque cubilia rutrum mollis nisl, eleifend imperdiet lacinia fames gravida sed mus
+ magnis. Pretium aliquet consequat curabitur eros eleifend praesent, nostra malesuada
+ hendrerit ornare volutpat, cubilia aptent at mollis convallis.
+ """;
+
+ private readonly VisualStudioExtensibility extensibility;
+ private string sampleText = LoremIpsumText;
+ private bool manualUpdate = false;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ /// Extensibility object instance.
+ ///
+ public MyToolWindowData(VisualStudioExtensibility extensibility)
+ {
+ this.extensibility = Requires.NotNull(extensibility, nameof(extensibility));
+
+ this.UpdateCommand = new AsyncCommand(this.UpdateAsync);
+
+ this.InitializeSettingsAsync(extensibility).Forget();
+ }
+
+ ///
+ /// Gets the async command used to show a message prompt.
+ ///
+ [DataMember]
+ public IAsyncCommand UpdateCommand
+ {
+ get;
+ }
+
+ ///
+ /// Gets or sets a value indicating whether the user must
+ /// click the "Update" button to refresh the sample text.
+ ///
+ [DataMember]
+ public bool ManualUpdate
+ {
+ get => this.manualUpdate;
+ set => this.SetProperty(ref this.manualUpdate, value);
+ }
+
+ ///
+ /// Gets or sets the message to display in the message prompt.
+ ///
+ [DataMember]
+ public string SampleText
+ {
+ get => this.sampleText;
+ set => this.SetProperty(ref this.sampleText, value);
+ }
+
+#pragma warning disable VSEXTPREVIEW_SETTINGS // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
+
+ private async Task InitializeSettingsAsync(VisualStudioExtensibility extensibility)
+ {
+ await extensibility.Settings().SubscribeAsync(
+ [SettingDefinitions.SettingsSampleCategory],
+ CancellationToken.None,
+ values =>
+ {
+ if (values.TryGetValue(SettingDefinitions.AutoUpdateSetting.FullId, out ISettingValue? autoUpdateValue))
+ {
+ this.ManualUpdate = !autoUpdateValue.Value();
+ }
+
+ if (!this.ManualUpdate)
+ {
+ this.UpdateSampleTextFromSettings(values);
+ }
+ });
+ }
+
+ private async Task UpdateAsync(object? commandParameter, CancellationToken cancellationToken)
+ {
+ SettingValues values = await this.extensibility.Settings().ReadEffectiveValuesAsync(
+ [SettingDefinitions.SettingsSampleCategory],
+ cancellationToken);
+
+ this.UpdateSampleTextFromSettings(values);
+ }
+
+ private void UpdateSampleTextFromSettings(SettingValues values)
+ {
+ string text = LoremIpsumText;
+
+ if (values.TryGetValue(SettingDefinitions.TextLengthSetting.FullId, out ISettingValue? textLengthValue))
+ {
+ int length = textLengthValue.Value();
+ text = LoremIpsumText[..Math.Min(length, LoremIpsumText.Length)];
+ }
+
+ if (values.TryGetValue(SettingDefinitions.QuoteStyleSetting.FullId, out ISettingValue? quoteStyleValue))
+ {
+ this.SampleText = quoteStyleValue.Value() switch
+ {
+ "single" => $"'{text}'",
+ "double" => $"\"{text}\"",
+ _ => text,
+ };
+ }
+ }
+#pragma warning restore VSEXTPREVIEW_SETTINGS // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
+}
diff --git a/New_Extensibility_Model/Samples/SettingsSample/README.md b/New_Extensibility_Model/Samples/SettingsSample/README.md
new file mode 100644
index 00000000..c271ebb9
--- /dev/null
+++ b/New_Extensibility_Model/Samples/SettingsSample/README.md
@@ -0,0 +1,151 @@
+---
+title: Extension Settings Sample reference
+description: A reference sample for extensions settings
+date: 2024-08-20
+---
+
+# Walkthrough: Extension Settings Sample
+
+This extension is a simple extension that shows how a tool window can be quickly added to Visual Studio.
+
+## Setting definitions
+
+The extension contains a code file that defines a tool window and its properties starting with the `VisualStudioContribution` class attribute which makes the tool window available to Visual Studio:
+
+```csharp
+[VisualStudioContribution]
+public class MyToolWindow : ToolWindow
+{
+```
+
+The `ToolWindowConfiguration` property defines information about the tool window that is available to Visual Studio even before the extension is loaded:
+
+```csharp
+public override ToolWindowConfiguration ToolWindowConfiguration => new()
+{
+ Placement = ToolWindowPlacement.DocumentWell,
+};
+```
+
+This configuration places the tool window in the document well when it's created the first time. You can refer to [ToolWindowPlacement](https://learn.microsoft.com/en-us/dotnet/api/microsoft.visualstudio.extensibility.toolwindows.toolwindowplacement?view=vs-extensibility) to learn about other placement options. Since this configuration doesn't specify the additional options, it will have the default DockDirection and AllowAutoCreation values. You can refer to [ToolWindowConfiguration](https://learn.microsoft.com/en-us/visualstudio/extensibility/visualstudio.extensibility/tool-window/tool-window#toolwindow-attribute) to learn more about the configuration options.
+
+The title of the tool window can be customized by setting the Title property:
+
+```csharp
+public MyToolWindow(VisualStudioExtensibility extensibility)
+ : base(extensibility)
+{
+ this.Title = "My Tool Window";
+}
+```
+
+Adding content to the tool window can be done by setting up a remote user control and corresponding data model:
+
+```csharp
+public override Task InitializeAsync(CancellationToken cancellationToken)
+{
+ this.dataContext = new MyToolWindowData(this.Extensibility);
+ return Task.CompletedTask;
+}
+public override Task GetContentAsync(CancellationToken cancellationToken)
+{
+ return Task.FromResult(new MyToolWindowControl(this.dataContext));
+}
+```
+The data model creation and any other precursor work should be done in the InitializeAsync while the actual UI creation happens in the GetContentAsync.
+
+## Tool window content creation
+
+The tool window content is created as a DataTemplate .xaml file and a separate control class .cs file:
+
+```xml
+
+ ...
+
+```
+
+```csharp
+internal class MyToolWindowControl : RemoteUserControl
+{
+```
+
+The .cs and .xaml files should have the same name (MyToolWindowControl in this sample). Additionally the xaml file should be included as an EmbeddedResource instead of a Page, so editing the csproj file may be necessary in some cases.
+
+A data model that backs the UI is required for data-driven UI:
+
+```csharp
+[DataContract]
+internal class MyToolWindowData : NotifyPropertyChangedObject
+{
+```
+
+The data model must derive from NotifyPropertyChangedObject and set the DataContract class attribute and DataMemeber property attribute for all UI bound properties.
+
+You can refer to [Add content to a tool window](https://learn.microsoft.com/en-us/visualstudio/extensibility/visualstudio.extensibility/tool-window/tool-window#add-content-to-a-tool-window) to learn more about setting up the tool window content and remote UI.
+
+## Show tool window command definition
+
+Once the tool window is defined, it's common to have a command to allow showing the tool window. The extension contains a code file that defines a command and its properties starting with the `VisualStudioContribution` class attribute which makes the command available to Visual Studio:
+
+```csharp
+[VisualStudioContribution]
+public class MyToolWindowCommand : Command
+{
+```
+
+The `CommandConfiguration` property defines information about the command that are available to Visual Studio even before the extension is loaded:
+
+```csharp
+public override CommandConfiguration CommandConfiguration => new("%ToolWindowSample.MyToolWindowCommand.DisplayName%")
+{
+ Placements = [CommandPlacement.KnownPlacements.ToolsMenu],
+ Icon = new(ImageMoniker.KnownValues.ToolWindow, IconSettings.IconAndText),
+};
+```
+
+The command is placed in the `Tools` top menu and uses the `ToolWindow` icon moniker.
+
+```csharp
+public override async Task ExecuteCommandAsync(IClientContext context, CancellationToken cancellationToken)
+{
+ await this.Extensibility.Shell().ShowToolWindowAsync(activate: true, cancellationToken);
+}
+```
+
+When executed, the command will use the tool window type to look up and show that tool window. Because the parameter 'activate' is true, the tool window content will be focused when the tool window is shown. Passing 'false' instead means the tool window and its content will be shown, but not receive focus.
+
+## Adding a toolbar
+
+It is possible to add a toolbar to a tool window by contributing a toolbar configuration. The toolbar configuration is a static property that can be placed in any class of the project, but it is reasonable to add it to the `MyToolWindow` class.
+
+```csharp
+[VisualStudioContribution]
+private static ToolbarConfiguration Toolbar => new("%ToolWindowSample.MyToolWindow.Toolbar.DisplayName%")
+{
+ Children = [ToolbarChild.Command()],
+};
+```
+
+In the sample above, the toolbar contains a single command: `MyToolbarCommand`.
+
+Then we reference the toolbar from the tool window configuration:
+
+```csharp
+public override ToolWindowConfiguration ToolWindowConfiguration => new()
+{
+ Placement = ToolWindowPlacement.DocumentWell,
+ Toolbar = new ToolWindowToolbar(Toolbar),
+};
+```
+
+## Logging errors
+
+Each extension part including command sets is assigned a `TraceSource` instance that can be utilized to log diagnostic errors. Please see [Logging](https://learn.microsoft.com/visualstudio/extensibility/visualstudio.extensibility/inside-the-sdk/logging) section for more information.
+
+## Usage
+
+Once deployed, the My Tool Window command can be used to show My Tool Window in the document well.
\ No newline at end of file
diff --git a/New_Extensibility_Model/Samples/SettingsSample/SettingDefinitions.cs b/New_Extensibility_Model/Samples/SettingsSample/SettingDefinitions.cs
new file mode 100644
index 00000000..7fb3de4e
--- /dev/null
+++ b/New_Extensibility_Model/Samples/SettingsSample/SettingDefinitions.cs
@@ -0,0 +1,43 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+namespace SettingsSample;
+
+using Microsoft.VisualStudio.Extensibility;
+using Microsoft.VisualStudio.Extensibility.Settings;
+
+#pragma warning disable VSEXTPREVIEW_SETTINGS // The settings API is currently in preview and marked as experimental
+
+internal static class SettingDefinitions
+{
+ [VisualStudioContribution]
+ internal static SettingCategory SettingsSampleCategory { get; } = new("settingsSample", "%SettingsSample.Settings.Category.DisplayName%")
+ {
+ Description = "%SettingsSample.Settings.Category.Description%",
+ };
+
+ [VisualStudioContribution]
+ internal static Setting.Boolean AutoUpdateSetting { get; } = new("autoUpdate", "%SettingsSample.Settings.AutoUpdate.DisplayName%", SettingsSampleCategory, defaultValue: true)
+ {
+ Description = "%SettingsSample.Settings.AutoUpdate.Description%",
+ };
+
+ [VisualStudioContribution]
+ internal static Setting.Integer TextLengthSetting { get; } = new("textLength", "%SettingsSample.Settings.TextLength.DisplayName%", SettingsSampleCategory, defaultValue: 10)
+ {
+ Description = "%SettingsSample.Settings.TextLength.Description%",
+ Minimum = 1,
+ Maximum = MyToolWindowData.LoremIpsumText.Length,
+ };
+
+ [VisualStudioContribution]
+ internal static Setting.Enum QuoteStyleSetting { get; } = new(
+ "quoteStyle",
+ "%SettingsSample.Settings.QuoteStyle.DisplayName%",
+ SettingsSampleCategory,
+ [new EnumSettingEntry("none", "%SettingsSample.Settings.QuoteStyle.None%"), new EnumSettingEntry("single", "%SettingsSample.Settings.QuoteStyle.Single%"), new EnumSettingEntry("double", "%SettingsSample.Settings.QuoteStyle.Double%")],
+ defaultValue: "double")
+ {
+ Description = "%SettingsSample.Settings.QuoteStyle.Description%",
+ };
+}
diff --git a/New_Extensibility_Model/Samples/SettingsSample/SettingsSample.csproj b/New_Extensibility_Model/Samples/SettingsSample/SettingsSample.csproj
new file mode 100644
index 00000000..e8329e55
--- /dev/null
+++ b/New_Extensibility_Model/Samples/SettingsSample/SettingsSample.csproj
@@ -0,0 +1,18 @@
+
+
+ net8.0-windows8.0
+ enable
+ 12
+ en-US
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/New_Extensibility_Model/Samples/SettingsSample/SettingsSampleExtension.cs b/New_Extensibility_Model/Samples/SettingsSample/SettingsSampleExtension.cs
new file mode 100644
index 00000000..82c04694
--- /dev/null
+++ b/New_Extensibility_Model/Samples/SettingsSample/SettingsSampleExtension.cs
@@ -0,0 +1,31 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+namespace SettingsSample;
+
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.VisualStudio.Extensibility;
+
+///
+/// Extension entry point for the SettingsSample.
+///
+[VisualStudioContribution]
+public class SettingsSampleExtension : Extension
+{
+ ///
+ public override ExtensionConfiguration ExtensionConfiguration => new()
+ {
+ Metadata = new(
+ id: "SettingsSampleExtension.4ca466cb-dc8d-4216-8323-b5c45f8e0da5",
+ version: this.ExtensionAssemblyVersion,
+ publisherName: "Microsoft",
+ displayName: "Settings Sample Extension",
+ description: "Sample extension demonstrating settings"),
+ };
+
+ ///
+ protected override void InitializeServices(IServiceCollection serviceCollection)
+ {
+ base.InitializeServices(serviceCollection);
+ }
+}