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
This file contains 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 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; |