Here is a list of tools that makes Visual Studio extension development easier.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
Here is a list of things to make sure to remember before publishing your Visual Studio extension.
Add the Microsoft.VisualStudio.SDK.Analyzers NuGet package to your VSIX project, which will help you discover and fix common violations of best practices regarding threading.
All extensions should have an icon associated with it. Make sure the icon is a high-quality .png file with the size 90x90 pixels in 96 DPI or more. After adding the icon to your VSIX project, register it in the .vsixmanifest file as both the Icon and Preview image.
The numbers in paranthesis is the version of Visual Studio where the API was introduced.
- Async QuickInfo (15.6)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Render the partial --> | |
@{await Html.RenderPartialAsync("_SocialSharing", ViewData["Title"]);} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.AspNetCore.WebUtilities; | |
using Microsoft.Net.Http.Headers; | |
using System.IO; | |
using System.Security.Cryptography; | |
using System.Threading.Tasks; | |
public class ETagMiddleware | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
On the package | |
[ProvideAutoLoad(UIContexts.LoadContext)] | |
[ProvideUIContextRule(UIContexts.LoadContext, | |
"RightFileTypeOpen", | |
"(CSharpFileOpen | VBFileOpen)", | |
new[] { "CSharpFileOpen", "VBFileOpen" }, | |
new[] { "ActiveEditorContentType:CSharp", "ActiveEditorContentType:Basic" })] | |
In the VSCT |
NewerOlder