Skip to content

Instantly share code, notes, and snippets.

View madskristensen's full-sized avatar

Mads Kristensen madskristensen

View GitHub Profile
@madskristensen
madskristensen / VSIX-Checklist.md
Last active August 6, 2023 13:07
VS extension checklist

Visual Studio Extensibility Checklist

Here is a list of things to make sure to remember before publishing your Visual Studio extension.

Adhere to threading rules

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.

Add high-quality icon

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.

Name and description

@madskristensen
madskristensen / _Layout.cshtml
Last active September 17, 2023 06:57
Social sharing buttons for ASP.NET Core
<!-- Render the partial -->
@{await Html.RenderPartialAsync("_SocialSharing", ViewData["Title"]);}
@madskristensen
madskristensen / ETagMiddleware.cs
Last active March 18, 2024 15:11
ASP.NET Core ETAg middleware
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
{