Table of Contents

CadPluginBuild

from OpenCAD2D.Plugins import CadPluginBuild

class CadPluginBuild(System.Object) ยท CadPluginBuild in the .NET reference

What compiling a plugin given as a folder with a .csproj gave (CadPluginLoader.Compile): the assembly and its PDB, or the errors that kept it from being built. A plugin folder Stairs that compiles gives Stairs.dll and Stairs.pdb in the cache; one with an unknown name on line 12 of Stairs.cs gives one error, Stairs.cs(12,9): error CS0103: The name 'x' does not exist in the current context; one whose Stairs.csproj holds a condition, which is not evaluated, gives the build and the warning Stairs.csproj: <PropertyGroup Condition="'$(Configuration)' == 'Debug'"> was not read (conditions are not evaluated).

Constructors

__init__

.NET

def __init__(self, errorCount: int, errors: System.Collections.Generic.IReadOnlyList[str]) -> None

Initializes a build that failed.

def __init__(
    self,
    assemblyPath: str,
    pdbPath: str,
    fromCache: bool,
    warnings: System.Collections.Generic.IReadOnlyList[str],
) -> None

Initializes a build that succeeded.

Properties and fields

AssemblyPath

.NET

@property
def AssemblyPath(self) -> str | None

Gets the full path of the assembly; null where the build failed.

ErrorCount

.NET

@property
def ErrorCount(self) -> int

Gets the number of errors; 0 where the build succeeded.

Errors

.NET

@property
def Errors(self) -> System.Collections.Generic.IReadOnlyList[str]

Gets the error lines, at most the first 20, sorted by file, line, column and id; empty where the build succeeded.

FromCache

.NET

@property
def FromCache(self) -> bool

Gets whether the assembly was taken from the cache, the project and its sources unchanged since they were last compiled.

PdbPath

.NET

@property
def PdbPath(self) -> str | None

Gets the full path of the assembly's PDB; null where the build failed.

Succeeded

.NET

@property
def Succeeded(self) -> bool

Gets whether the assembly was built (or found in the cache).

Warnings

.NET

@property
def Warnings(self) -> System.Collections.Generic.IReadOnlyList[str]

Gets the lines about what the project holds that is not read (a condition, a Directory.Build.props, a target framework that is not .NET 8), in the order the project gives them; empty where the build failed or the project was read whole.