Skip to content

Instantly share code, notes, and snippets.

@cpyfferoen
cpyfferoen / NugetManager.cs
Last active June 28, 2024 09:53
NuGet API wrapper to search/install packages WITH AUTHENTICATION the same way Nuget.Exe/Client does it - looks up CredentialProviders and plugins (also for Credentials). Specific use case was Azure DevOps feed access.
using NuGet.Common;
using NuGet.Configuration;
using NuGet.Credentials;
using NuGet.PackageManagement;
using NuGet.Packaging;
using NuGet.Packaging.Core;
using NuGet.Packaging.Signing;
using NuGet.ProjectManagement;
using NuGet.Protocol;
using NuGet.Protocol.Core.Types;
@AdmiringWorm
AdmiringWorm / Funcs.md
Last active March 20, 2021 14:19
PowerShell function not to use in Chocolatey community packages

There are some rules regarding which functions can be used in in Chocolatey packages hosted on the community repository. Basically, any function not available in PowerShell v2.0 can not be used (without a fallback helper). In this gist I want to keep a list of functions that were not available in PowerShell 2.0, or I have found that did not work as expected.

  • Convert-FromJson - while it is a common function nowadays, this was only added in PowerShell 3.0 and can not be used in a community package.
  • Get-ItemPropertyValue - added in PowerShell 5.0, and do not exist on the Chocolatey verifier.
  • Import-Certificate - Only available on some Server platforms (and Windows 10). As an alternative the linked fallback helper can be used instead
@legowerewolf
legowerewolf / readme.md
Last active April 7, 2024 02:13
Tailscale on Steam Deck