ParsedPackageReference Class

Summary

Represents a single <PackageReference> element parsed out of a project file by Cake.Incubator.Project.ProjectParserExtensions.ParseProject(Cake.Core.ICakeContext,Cake.Core.IO.FilePath,System.String).
Assembly
Cake.Incubator.dll
Namespace
Cake.Incubator.Project
Base Types
  • Object
graph BT Type-->Base0["Object"] Type["ParsedPackageReference"] class Type type-node

Syntax

public class ParsedPackageReference

Remarks

Renamed from PackageReference to ParsedPackageReference in v11.0.0 to disambiguate from Cake.Core.Packaging.PackageReference. The two types have unrelated purposes (this one is a csproj-parsing DTO; the Cake.Core type describes a runtime tool-installation reference) but the unqualified short name collided whenever both namespaces were brought into the same compilation unit — most notably inside Cake.Sdk's source-generated helpers, which prevented cake.cs consumers from compiling against this addin at all. See cake-contrib/Cake.Incubator#268 for the rename background.

Constructors

Properties

Name Value Summary
ExcludeAssets string[]
These assets will not be consumed
IncludeAssets string[]
These assets will be consumed
Name string
The package name
PrivateAssets string[]
These assets will be consumed but won't flow to the parent project
TargetFramework string
returns any package specific target framework
Version string
The package version

Extension Methods

Name Value Summary
Dump<ParsedPackageReference>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<ParsedPackageReference>(ParsedPackageReference[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<ParsedPackageReference>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Issues addin
NotNull<ParsedPackageReference>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
ThrowIfNull<ParsedPackageReference>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<ParsedPackageReference>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin
ToStringWithNullMarkup() string
Returns the string value or a Not set> markup suitable for Spectre.Console.
Requires the Cake.Issues addin