Skip to content

Instantly share code, notes, and snippets.

View joelverhagen's full-sized avatar

Joel Verhagen joelverhagen

View GitHub Profile
@joelverhagen
joelverhagen / Routes.cs
Created November 28, 2017 00:06
Example of custom IPackageService in NuGet.Server 2.8.2
using System.Data.Services;
using System.ServiceModel.Activation;
using System.Web;
using System.Web.Routing;
using NuGet.Server;
using NuGet.Server.DataServices;
using NuGet.Server.Infrastructure;
[assembly: WebActivatorEx.PreApplicationStartMethod(typeof(WebApplication1.NuGetRoutes), "Start")]
@joelverhagen
joelverhagen / PackagesWithAmbiguousVersions.txt
Created November 25, 2017 00:59
Packages with versions that cause our statistics pipeline to skip them.
AspectCore.Extensions.AspectScope 0.2.0-preview7.0.1
BuildMaster.Net 1.0.0-1.0.3
BuildMaster.Net 1.0.0-1.0.4
Canducci.SqlKata.Dapper 1.0.0-beta-1.0.1
Canducci.SqlKata.Dapper 1.0.0-beta-2.0.2
Canducci.SqlKata.Dapper 1.0.0-beta-2.0.3
Canducci.SqlKata.Dapper 1.0.0-beta-2.0.4
Canducci.SqlKata.Dapper 1.0.0-beta-2.0.5
Canducci.SqlKata.Dapper 1.0.0-beta-2.0.6
Canducci.SqlKata.Dapper.MySql 1.0.0-Beta-2.0.1
@joelverhagen
joelverhagen / Output.md
Last active November 23, 2017 06:38
Demonstrate the case sensitivity properties of different NuGet.org components
Area A ?? B Out A Out B
Azure Blob Storage I != i
Azure Blob Storage ı != i
Azure Blob Storage ı != I
Azure Blob Storage İ != i
Azure Blob Storage İ != I
Azure Blob Storage İ != ı
Lucene LowerCaseFilter I == i
Lucene LowerCaseFilter ı != i
@joelverhagen
joelverhagen / FindLatestNuGetVersion.ps1
Last active November 10, 2017 02:17
Latest version of a NuGet package in PowerShell
# See: https://docs.microsoft.com/en-us/nuget/api/service-index
$serviceIndex = Invoke-RestMethod "https://api.nuget.org/v3/index.json"
$searchUrl = $serviceIndex.resources `
| ? { ($_ | Select -ExpandProperty "@type") -eq "SearchQueryService" } `
| % { $_ | Select -ExpandProperty "@id" } `
| Select-Object -First 1
$packageId = "NuGet.Versioning"
$includePrerelease = $true
@joelverhagen
joelverhagen / gist:fde5a70d672620128da07c4a963c8ad4
Created November 8, 2017 23:05
NuGet.org package IDs ending in digits
1.0 1.0.0
1.0.0 1.0.0
1.0.0.0 1.0.0
1.0.10 1.0.30
1.0.2.3 1.0.2.3
1.0.2.4 1.0.2.4
1.1 1.0.0
1.111 1.111.0
5.0.0.0 5.0.0
Aalmaram.4.0 2.0.0
@joelverhagen
joelverhagen / Program.cs
Created October 27, 2017 20:23
Determine package size using NuGet V3 API
using System;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using NuGet.Common;
using NuGet.Frameworks;
using NuGet.Packaging.Core;
using NuGet.Protocol;
using NuGet.Protocol.Core.Types;
using NuGet.Versioning;

Keybase proof

I hereby claim:

  • I am joelverhagen on github.
  • I am joelverhagen (https://keybase.io/joelverhagen) on keybase.
  • I have a public key whose fingerprint is 118C 6DDC 8F74 9972 8C1F 8C12 614B F64D 61B1 0094

To claim this, I am signing this object:

@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
@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 / screenshot.png
Last active February 12, 2016 22:05
Better NuGet GUI Error
screenshot.png