This project implements a purl parser and class for .NET. Its available as a .NET Standard 2.0 library on NuGet.org.
From root of the repository, using dotnet-cli v6.0+:
dotnet pack -c Release
dotnet test -c Release ./testsOpen ./PackageUrl.sln in Visual Studio 2022+, build solution and run tests using the Test Explorer.
dotnet add <Path-to-Project-file> package packageurl-dotnetor in project file, add:
<PackageReference Include="packageurl-dotnet" Version="1.0.0" />Creates a new PURL object from a string:
PackageUrl purl = new PackageUrl(purlString);Creates a new PURL object from purl parameters:
PackageUrl purl = new PackageUrl(type, namespace, name, version, qualifiers, subpath);Permission to modify and redistribute is granted under the terms of the MIT License.