Skip to content

package-url/packageurl-dotnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

a42c0b8 · May 25, 2023

History

56 Commits
Feb 26, 2022
May 25, 2023
May 25, 2023
Jan 8, 2022
Jan 15, 2022
Jan 11, 2022
Jan 8, 2022
Apr 23, 2018
Apr 23, 2018
Feb 28, 2022
Jan 11, 2022

Repository files navigation

Build License NuGet version (packageurl-dotnet)

Package URL (purl) for .NET

This project implements a purl parser and class for .NET. Its available as a .NET Standard 2.0 library on NuGet.org.

Build and Test (command line)

From root of the repository, using dotnet-cli v6.0+:

dotnet pack -c Release
dotnet test -c Release ./tests

Build and Test (Visual Studio)

Open ./PackageUrl.sln in Visual Studio 2022+, build solution and run tests using the Test Explorer.

Installation

dotnet add <Path-to-Project-file> package packageurl-dotnet

or in project file, add:

<PackageReference Include="packageurl-dotnet" Version="1.0.0" />

Usage

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);

License

Permission to modify and redistribute is granted under the terms of the MIT License.