Skip to content

Instantly share code, notes, and snippets.

View joelverhagen's full-sized avatar

Joel Verhagen joelverhagen

View GitHub Profile
@joelverhagen
joelverhagen / LibGit2SharpPerformance.cs
Last active August 29, 2015 14:00
Performance tests of LibGit2Sharp "git add" and "git commit" versus the standard "git.exe".
using System;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Text;
using LibGit2Sharp;
namespace LibGitTest
{
internal class Program
@joelverhagen
joelverhagen / RedirectingHandler.cs
Last active January 16, 2024 05:04
RedirectingHandler
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
namespace Knapcode.Http.Handlers
{
@joelverhagen
joelverhagen / Demo.cs
Last active August 29, 2015 14:12
Convert a Try... function in C# to a Get... function.
// Try it out: http://ideone.com/Aubx5H
using System;
namespace Knapcode.KitchenSink.Extensions
{
public static class UniversalExtensions
{
public delegate bool TryGetValue<in TInput, TOutput>(TInput input, out TOutput value);
info : Restoring packages for C:\Users\jver\Desktop\Test\errors\ConsoleApp1\src\ConsoleApp1\project.json...
error: System.Console 4.0.0-beta-23516 provides a compile-time reference assembly for System.Console on DNXCore,Version=v5.0, but there is no run-time assembly compatible with win7-x64.
error: System.Threading 4.0.11-beta-23516 provides a compile-time reference assembly for System.Threading on DNXCore,Version=v5.0, but there is no run-time assembly compatible with win7-x64.
error: System.Dynamic.Runtime 4.0.0 provides a compile-time reference assembly for System.Dynamic.Runtime on DNXCore,Version=v5.0, but there is no run-time assembly compatible with win7-x64.
error: System.Linq.Expressions 4.0.0 provides a compile-time reference assembly for System.Linq.Expressions on DNXCore,Version=v5.0, but there is no run-time assembly compatible with win7-x64.
error: System.Security.Cryptography.Algorithms 4.0.0-beta-23516 provides a compile-time reference assembly for System.Security.Cryptography.Algorithms on D
info : Restoring packages for C:\Users\jver\Desktop\Test\errors\ConsoleApp1\src\ConsoleApp1\project.json...
info : Installing System.Security.Cryptography.Encryption 4.0.0-beta-23109.
info : Installing System.Reflection.Primitives 4.0.0-beta-23109.
info : Installing System.Reflection 4.0.0-beta-23109.
info : Installing System.Globalization 4.0.0-beta-23109.
info : Installing System.Private.Uri 4.0.0-beta-23109.
info : Installing System.Diagnostics.Debug 4.0.0.
info : Installing System.Private.Uri 4.0.1-beta-23516.
info : Installing System.Security.SecureString 4.0.0-beta-23109.
info : Installing System.Threading.ThreadPool 4.0.10-beta-23109.
dotnet run -- restore C:\Users\jver\Desktop\Test\dotnetnew5 --verbosity minimal
log : Restoring packages for C:\Users\jver\Desktop\Test\dotnetnew5\project.json...
log : Installing System.Text.Encoding 4.0.0.
log : Installing Microsoft.NETCore.Targets.DNXCore 5.0.0-rc2-23704.
log : Installing Microsoft.NETCore.Windows.ApiSets 1.0.1-rc2-23704.
log : Installing System.IO 4.0.0.
log : Installing System.Reflection.Primitives 4.0.0.
log : Installing Microsoft.NETCore.Targets 1.0.1-rc2-23704.
log : Installing Microsoft.NETCore.Runtime.CoreCLR 1.0.1-rc2-23704.
<script src="https://gist.github.com/joelverhagen/1850654.js"></script>
@joelverhagen
joelverhagen / screenshot.png
Last active February 12, 2016 22:05
Better NuGet GUI Error
screenshot.png
@joelverhagen
joelverhagen / VersionConventions.md
Last active August 3, 2018 15:37
NuGet Package Version Conventions

NuGet Package Version Conventions

CI packages and release packages

A common pattern for NuGet package versions is producing two sets of .nupkgs for every CI build. That is two sets of functionally equivalent packages produced from the same source. Two sets are:

  1. CI packages: a NuGet package version that is suffixed with a build number. This allows bleeding edge consumption of the latest APIs or fixes. These packages are typically pushed to a development package feed like VSTS or MyGet. Example version numbers: 4.0.0-rc-2046, 3.5.0-rtm-1996, 3.5.0-beta2-1543
@joelverhagen
joelverhagen / calls.txt
Created November 11, 2016 00:23
Variants of HTTP calls made by NuGet.exe list
[no Search()] nuget.exe list
[no Search()] nuget.exe list -allversions
[no Search(), no IsAbsoluteLatestVersion] nuget.exe list
[no Search(), no IsAbsoluteLatestVersion] nuget.exe list -allversions
GET /api/v2/Packages HTTP/1.1
GET /api/v2/Packages?$skip=100 HTTP/1.1
[no Search()] nuget.exe list -allversions -prerelease
[no Search(), no IsAbsoluteLatestVersion] nuget.exe list -allversions -prerelease
GET /api/v2/Packages()?$orderby=Id&$skip=0&$top=30 HTTP/1.1