The numbers in paranthesis is the version of Visual Studio where the API was introduced.
- Async QuickInfo (15.6)
using System.ComponentModel.Composition; | |
using Microsoft.VisualStudio.Text.Editor; | |
using Microsoft.VisualStudio.Utilities; | |
namespace YamlSpacesFix | |
{ | |
[Export(typeof(IWpfTextViewCreationListener))] | |
[ContentType(ContentType)] | |
[TextViewRole(PredefinedTextViewRoles.PrimaryDocument)] | |
public class YamlCreationListener : IWpfTextViewCreationListener |
The numbers in paranthesis is the version of Visual Studio where the API was introduced.
Here is a list of tools that makes Visual Studio extension development easier.
public static BitmapSource GetImage(ImageMoniker moniker, int size) | |
{ | |
ImageAttributes imageAttributes = new ImageAttributes(); | |
imageAttributes.Flags = (uint)_ImageAttributesFlags.IAF_RequiredFlags; | |
imageAttributes.ImageType = (uint)_UIImageType.IT_Bitmap; | |
imageAttributes.Format = (uint)_UIDataFormat.DF_WPF; | |
imageAttributes.LogicalHeight = size; | |
imageAttributes.LogicalWidth = size; | |
imageAttributes.StructSize = Marshal.SizeOf(typeof(ImageAttributes)); |
using System.ComponentModel.Composition; | |
using Microsoft.VisualStudio.Shell; | |
using Microsoft.VisualStudio.Shell.TableManager; | |
public class ExtensionPackage : Package | |
{ | |
[Import] | |
private ITableManagerProvider _tableManagerProvider; | |
protected override void Initialize() |
On the package | |
[ProvideAutoLoad(UIContexts.LoadContext)] | |
[ProvideUIContextRule(UIContexts.LoadContext, | |
"RightFileTypeOpen", | |
"(CSharpFileOpen | VBFileOpen)", | |
new[] { "CSharpFileOpen", "VBFileOpen" }, | |
new[] { "ActiveEditorContentType:CSharp", "ActiveEditorContentType:Basic" })] | |
In the VSCT |
function RemoveBadge { | |
param ($path) | |
Write-Host "Looking for PreviewBadge.pkgdef in $path" | |
$file = Get-ChildItem -Path $path -Include *previewbadge.pkgdef -Recurse | |
if ($file){ | |
Remove-Item $file | |
Write-Host "PreviewBadge.pkgdef deleted" |
{ | |
"id": "017794d6-b8b4-48ab-88a5-eb696ac07322", | |
"name": "My Visual Studio extensions", | |
"description": "A collection of my Visual Studio extensions", | |
"version": "1.0", | |
"extensions": [ | |
{ | |
"name": "Add New File", | |
"vsixId": "2E78AA18-E864-4FBB-B8C8-6186FC865DB3" | |
}, |
//********************************************************// | |
// HOW TO: | |
// Create a file called devenv.pkgundef in the same directory as devenv.exe. | |
// It's usually located at C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE | |
// Then call "devenv.exe /updateconfiguration" from an elevated command prompt. | |
// REMARKS: | |
// Each GUID below represent a package that Visual Studio is loading. This is the | |
// list of package that I personally don't ever use. You can modify the list of |