Merge branch 'main' of github.com:Microsoft/VSExtensibility into editor-work
This commit is contained in:
Коммит
59e2ace053
|
@ -0,0 +1,81 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<MinimumVisualStudioVersion>17.0</MinimumVisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectTypeGuids>{82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<ProjectGuid>{54B4B640-D71B-493D-80CF-DD37B17F1E75}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>CommentRemoverContainer</RootNamespace>
|
||||
<AssemblyName>CommentRemoverContainer</AssemblyName>
|
||||
<TargetVsixContainerName>CommentRemover.vsix</TargetVsixContainerName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<GeneratePkgDefFile>false</GeneratePkgDefFile>
|
||||
<UseCodebase>true</UseCodebase>
|
||||
<IncludeAssemblyInVSIXContainer>false</IncludeAssemblyInVSIXContainer>
|
||||
<IncludeDebugSymbolsInVSIXContainer>false</IncludeDebugSymbolsInVSIXContainer>
|
||||
<IncludeDebugSymbolsInLocalVSIXDeployment>false</IncludeDebugSymbolsInLocalVSIXDeployment>
|
||||
<CopyBuildOutputToOutputDirectory>true</CopyBuildOutputToOutputDirectory>
|
||||
<CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory>
|
||||
<StartAction>Program</StartAction>
|
||||
<StartProgram Condition="'$(DevEnvDir)' != ''">$(DevEnvDir)devenv.exe</StartProgram>
|
||||
<StartArguments>/rootsuffix Exp</StartArguments>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Include="source.extension.vsixmanifest">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<Content Include="Resources\Icon.png">
|
||||
<IncludeInVSIX>true</IncludeInVSIX>
|
||||
</Content>
|
||||
<Content Include="Resources\Preview.png">
|
||||
<IncludeInVSIX>true</IncludeInVSIX>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.VSSDK.BuildTools" Version="17.3.2092" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Command-Parenting-Sample\CommandParentingSample.csproj">
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<IncludeInVSIX>true</IncludeInVSIX>
|
||||
<IncludeOutputGroupsInVSIX>DeploymentAssetsOutputGroup</IncludeOutputGroupsInVSIX>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
Двоичные данные
New_Extensibility_Model/Samples/Command-Parenting-Sample/Command-Parenting-Sample-Container/Resources/Icon.png
Normal file
Двоичные данные
New_Extensibility_Model/Samples/Command-Parenting-Sample/Command-Parenting-Sample-Container/Resources/Icon.png
Normal file
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 1.8 KiB |
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 2.9 KiB |
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
|
||||
<Metadata>
|
||||
<Identity Id="d7c3f904-cc5a-4d47-aa25-81fb5556df89" Version="1.0" Language="en-US" Publisher="Ryan Toth" />
|
||||
<DisplayName>Command Parenting Sample</DisplayName>
|
||||
<Description xml:space="preserve">A sample extension to demonstrate how to parent commands to various different parts of Visual Studio.</Description>
|
||||
<Icon>Resources\Icon.png</Icon>
|
||||
<PreviewImage>Resources\Preview.png</PreviewImage>
|
||||
</Metadata>
|
||||
<Installation>
|
||||
<InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="[17.0,18.0)">
|
||||
<ProductArchitecture>amd64</ProductArchitecture>
|
||||
</InstallationTarget>
|
||||
</Installation>
|
||||
<Prerequisites>
|
||||
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0,)" DisplayName="Visual Studio core editor" />
|
||||
</Prerequisites>
|
||||
</PackageManifest>
|
|
@ -0,0 +1,70 @@
|
|||
{
|
||||
"controlContainers": [
|
||||
{
|
||||
"name": "CommandParentingSample.Toolbar",
|
||||
"type": "Toolbar",
|
||||
"displayName": "Command Parenting Sample Toolbar"
|
||||
}
|
||||
],
|
||||
"controlGroups": [
|
||||
{
|
||||
"name": "CommandParentingSample.ToolbarGroup",
|
||||
"parent": {
|
||||
"parentName": "CommandParentingSample.Toolbar"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "CommandParentingSample.ContextMenuGroup1",
|
||||
"parent": {
|
||||
"legacyParentId": {
|
||||
"guid": "{d309f791-903f-11d0-9efc-00a0c911004f}",
|
||||
"id": 1072 // File in project context menu
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "CommandParentingSample.ContextMenuGroup2",
|
||||
"parent": {
|
||||
"legacyParentId": {
|
||||
"guid": "{d309f791-903f-11d0-9efc-00a0c911004f}",
|
||||
"id": 1026 // Project context menu
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "CommandParentingSample.ContextMenuGroup3",
|
||||
"parent": {
|
||||
"legacyParentId": {
|
||||
"guid": "{d309f791-903f-11d0-9efc-00a0c911004f}",
|
||||
"id": 1043 // Solution context menu
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"controlPlacements": [
|
||||
{
|
||||
"controlName": "CommandParentingSample.SampleCommand",
|
||||
"parent": {
|
||||
"parentName": "CommandParentingSample.ToolbarGroup"
|
||||
}
|
||||
},
|
||||
{
|
||||
"controlName": "CommandParentingSample.SampleCommand",
|
||||
"parent": {
|
||||
"parentName": "CommandParentingSample.ContextMenuGroup1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"controlName": "CommandParentingSample.SampleCommand",
|
||||
"parent": {
|
||||
"parentName": "CommandParentingSample.ContextMenuGroup2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"controlName": "CommandParentingSample.SampleCommand",
|
||||
"parent": {
|
||||
"parentName": "CommandParentingSample.ContextMenuGroup3"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net472</TargetFrameworks>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>10</LangVersion>
|
||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||
<NoWarn>SA1633;SA1600;CA1303;CA1016;CA1031;CA1812;$(NoWarn>)</NoWarn>
|
||||
|
||||
<!-- The VisualStudio.Extensibility preview packages are available from the azure-public/vside/vssdk feed -->
|
||||
<RestoreAdditionalProjectSources>https://pkgs.dev.azure.com/azure-public/vside/_packaging/vssdk/nuget/v3/index.json;$(RestoreAdditionalProjectSources)</RestoreAdditionalProjectSources>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<AdditionalFiles Include=".vsextension\extension.json" ExtensionMetadata="true" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.VisualStudio.Extensibility.Sdk" Version="17.4.2052-preview-4" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Extensibility.Build" Version="17.4.2052-preview-4" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.SDK" Version="17.4.33006.217" ExcludeAssets="runtime" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,21 @@
|
|||
namespace CommandParentingSample;
|
||||
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.VisualStudio.Extensibility;
|
||||
using Microsoft.VisualStudio.Extensibility.Commands;
|
||||
using Microsoft.VisualStudio.Extensibility.Definitions;
|
||||
|
||||
[Command("CommandParentingSample.SampleCommand", "My Command")]
|
||||
internal class SampleCommand : Command
|
||||
{
|
||||
public SampleCommand(VisualStudioExtensibility extensibility, string id)
|
||||
: base(extensibility, id)
|
||||
{
|
||||
}
|
||||
|
||||
public override Task ExecuteCommandAsync(IClientContext context, CancellationToken cancellationToken)
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
title: Command Parenting Sample reference
|
||||
date: 2022-10-14
|
||||
---
|
||||
|
||||
## Command Parenting Sample
|
||||
|
||||
This extension is meant to act as a sample for how to author a command that can be parented to different aspects of the IDE. The command in this extension is parented to a new Toolbar created by the extension, the context menu when a project item is selected in the Solution Explorer, the context menu when a project is selected in the Solution Explorer, and the solution is selected in the Solution Explorer.
|
|
@ -21,10 +21,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleRemoteCommandSample",
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ToolWindowExtension", "ToolWindowExtension\ToolWindowExtension.csproj", "{4605F69C-8179-409E-A3FA-431DD41F35CB}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UserPromptSample", "UserPromptSample\UserPromptSample.csproj", "{6AAB3137-2974-45F1-A426-E28231F6FE13}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UserPromptSample", "UserPromptSample\UserPromptSample.csproj", "{6AAB3137-2974-45F1-A426-E28231F6FE13}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OutputWindowSample", "OutputWindowSample\OutputWindowSample.csproj", "{053DB39C-56F5-41DC-9C85-EA14FE3F49B7}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CommandParentingSample", "Command-Parenting-Sample\Command-Parenting-Sample\CommandParentingSample.csproj", "{24317836-E83F-4565-B7C7-F412CFF4463B}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -63,6 +65,10 @@ Global
|
|||
{053DB39C-56F5-41DC-9C85-EA14FE3F49B7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{053DB39C-56F5-41DC-9C85-EA14FE3F49B7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{053DB39C-56F5-41DC-9C85-EA14FE3F49B7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{24317836-E83F-4565-B7C7-F412CFF4463B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{24317836-E83F-4565-B7C7-F412CFF4463B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{24317836-E83F-4565-B7C7-F412CFF4463B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{24317836-E83F-4565-B7C7-F412CFF4463B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
Загрузка…
Ссылка в новой задаче