Community.VisualStudio.VSCT
16.0.22
See the version list below for details.
dotnet add package Community.VisualStudio.VSCT --version 16.0.22
NuGet\Install-Package Community.VisualStudio.VSCT -Version 16.0.22
<PackageReference Include="Community.VisualStudio.VSCT" Version="16.0.22"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add Community.VisualStudio.VSCT --version 16.0.22
#r "nuget: Community.VisualStudio.VSCT, 16.0.22"
// Install Community.VisualStudio.VSCT as a Cake Addin #addin nuget:?package=Community.VisualStudio.VSCT&version=16.0.22 // Install Community.VisualStudio.VSCT as a Cake Tool #tool nuget:?package=Community.VisualStudio.VSCT&version=16.0.22
Community toolkit for VSCT files used in Visual Studio extensions
Part of the VSIX Community
Summary
A development time MSBuild extension to Microsoft.VSSDK.BuildTools
Adds a new item type VSCTInclude
which ensures that the items path is added to VSCTIncludePath
and gives a warning if you do not include it in any VSCTCompile
file.
It also contains the VSGlobals.vsct file originally from the ExtensibilityTemplatePack.
It means the file can be versioned, and updated after the project is created from the template.
It lights up via the VSCTIncludePath
item group used by the VSCTCompile
target/task.
Purpose
This package attempts to solve some issues with the current extensibility model, specifically around VSCT files.
The API is dated and has lots of ugly COM legacy noise
The most common symbols in VSCT files have unintelligable IDs based on the old complex COM nature. New symbols are available which alias these to more readable and discoverable names.
Only Microsoft can update the build tools and that doesn't scale
This is a living project where the whole community can contribute helpers on top of the official VS SDK. There is no need to wait for Microsoft to make an update, since this projet gives the ability to continue the work in a separate work stream.
Templates
For both project- and item templates that utilizes this NuGet packages, download the Extensibility Template Pack.
How to use
VSGlobals
- Remove any local copy of
VSGlobals.vsct
you may have in your local project.- It may be hidden/nested under VSCommandTable.vsct
- Install the package into your VSIX project
-
- If you started with a project created from the ExtensibilityTemplatePack using the
VSIX Project w/Command (Community)
template, you don't need to do anything. 😂 - If you used an older template, or a different template you can now include and use the globals.
- If you started with a project created from the ExtensibilityTemplatePack using the
Ensure you have the following in your VSCommandTable.vsct
file
<Include href="VSGlobals.vsct"/>
Replace items like
<Parent guid="guidSHLMainMenu" id="IDM_VS_MENU_TOOLS"/>
with
<Parent guid="VSMainMenu" id="View.DevWindowsGroup.OtherWindows.Group1"/>
The top level groups are
- VSMainMenu
- VSNuGet
- VSTerminal
- VSFeedback
- VSEditor
- VSEditor2
If you have the latest ExtensibilityTemplatePack (V2.1.11 or higher) installed you will get intellisense and popups to show you where your item will be added. See Writing Visual Studio Extensions with Mads - Improving our community templates for a demonstration and more information.
Warnings
If you set an item as VSCTInclude
, but then do not reference it from a VSCTCompile
item you will get two warnings.
- CVSTK001 No VSCTCompile file includes this VSCTInclude
- This is shown for each VSCTInclude and jumps you to the include file.
- CSVTK002 Add <Include href="xxxx.vsct"/>
- This is shown for each VSCTCompile and jumps you to the compile file
- xxxx.vsct is the name of the VSCTInclude file.
- Here you can add the relevant snippet
<Include href="xxxx.vsct"/>
Properties
You can set these properties in your project or Directory.Build.props files.
Simple
Property | Default | Description |
---|---|---|
EnableDefaultVSCTIncludeItems |
true | Enable marking all non-VSCTCompile items of type *.vsct with the VSCTInclude Build Action. |
EnableVSGlobalsVSCT |
true | Add the VSGlobals.vsct file to the VSCTCompile tasks include search paths.<br/>Allows you to add <pre lang="xml"> <code><Include href="VSGlobals.vsct"/></code></pre> |
Advanced
Property | Default | Description |
---|---|---|
ShowVSGlobalsVSCT |
false | Show the VSGlobals.vsct file in your project. |
VSGlobalsVSCTDependentUpon |
VSCommandTable.vsct |
If ShowVSGlobalsVSCT is set to true, this is the name of the file under which the VSGlobals.vsct will be nested. |
VSGlobalsVSCTPath |
The directory of the package's copy of the VSGlobals.vsct |
This can be used to override the location with a personalized copy of the file, while keeping the logic from the package. |
VSCTIncludeExclude |
Semi-colon separated list of files (wildcards allowed) to exclude from being included as VSCTInclude if EnableDefaultVSCTIncludeItems is set to true. |
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
-
.NETFramework 4.7.2
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (9)
Showing the top 5 popular GitHub repositories that depend on Community.VisualStudio.VSCT:
Repository | Stars |
---|---|
VsixCommunity/Community.VisualStudio.Toolkit
Making it easier to write Visual Studio extensions
|
|
jeffdapaz/VisualChatGPTStudio
Add chatGPT functionalities directly on Visual Studio
|
|
madskristensen/MarkdownEditor2022
A Visual Studio extension
|
|
kitamstudios/rust-analyzer.vs
Rust language support for Visual Studio 2022
|
|
Exafunction/CodeiumVisualStudio
Visual Studio extension for Codeium
|