Class ProjectRef
- Namespace
- Ando.References
- Assembly
- ando.dll
Represents a reference to a project file (e.g., .csproj, package.json). Provides type-safe project references for build operations.
public class ProjectRef
- Inheritance
-
ProjectRef
- Inherited Members
Properties
Directory
The directory containing the project file. Useful for npm operations that need the package.json directory.
public string Directory { get; }
Property Value
Name
The project name (derived from file name without extension). Used in logging and step names for clarity.
public string Name { get; }
Property Value
Path
The path to the project file (e.g., .csproj, package.json).
public string Path { get; }
Property Value
Version
The project version (read from the Version element in .csproj). Returns "0.0.0" if no Version element is found. The version is lazily loaded and cached.
public string Version { get; }
Property Value
Methods
From(string)
Creates a project reference from a relative or absolute path.
public static ProjectRef From(string relativePath)
Parameters
relativePathstringPath to the project file.
Returns
ToBuildPath()
Converts to BuildPath for path composition.
public BuildPath ToBuildPath()
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
Operators
implicit operator string(ProjectRef)
public static implicit operator string(ProjectRef project)
Parameters
projectProjectRef