Both the .net framework/mono and .net core releases publish MSBuild tasks from the engine assembly (AltCover.Engine.dll) that wrap the command-line functionality (as documented here under Usage).
AltCover
For the C# programmer, attributes have the extra angle-brackets, while member [Name] : [type] with get, set
is a [type]
valued property called [Name]
; and string array
is just string[]
spelled out longhand.
For AltCover.Prepare
and AltCover.Collect
, the task parameters match the command line arguments in name and function, except that SymbolDirectories
is pluralised, ExposeReturnCode
is the converse of the command line option dropReturnCode
, and CommandLine
is everything after a --
. If AltCover.Collect
’s Executable
parameter is set, that switches the virtual --collect
flag off.
namespace AltCover
AltCover.Prepare
This is the instrumentation mode with --save --inplace
as default. Associated parameters are
type Prepare =
class
inherit Task
new : unit -> Prepare
override Execute : unit -> bool
member InputDirectories : string array with get, set
member OutputDirectories : string array with get, set
member SymbolDirectories : string array with get, set
member Dependencies : string array with get, set
member Keys : string array with get, set
member StrongNameKey : string with get, set
member Report : string with get, set
member FileFilter : string array with get, set
member AssemblyFilter : string array with get, set
member AssemblyExcludeFilter : string array with get, set
member TypeFilter : string array with get, set
member MethodFilter : string array with get, set
member AttributeFilter : string array with get, set
member PathFilter : string array with get, set
member AttributeTopLevel : string array with get, set
member TypeTopLevel : string array with get, set
member MethodTopLevel : string array with get, set
member CallContext : string array with get, set
member ReportFormat : string with get, set
member InPlace : bool with get, set
member Save : bool with get, set
member ZipFile : bool with get, set
member MethodPoint : bool with get, set
member All : bool with get, set
member LineCover : bool with get, set
member BranchCover : bool with get, set
member CommandLine : string array with get, set
member ExposeReturnCode : bool with get, set
member SourceLink : bool with get, set
member Eager : bool with get, set
member LocalSource : bool with get, set
member VisibleBranches : bool with get, set
member ShowStatic : string with get, set
member ShowGenerated : bool with get, set
member Verbosity : string with get, set
member Trivia: bool with get, set
member Portable: bool with get, set
end
AltCover.Collect
This is runner
mode with --collect
as default. Associated parameters are
type Collect =
class
inherit Task
new : unit -> Collect
override Execute : unit -> bool
[<Output>]
member Summary : string
[<Required>]
member RecorderDirectory : string with get, set
member WorkingDirectory : string with get, set
member Executable : string with get, set
member LcovReport : string with get, set
member Threshold : string with get, set
member Cobertura : string with get, set
member Packages : string array with get, set
member OutputFile : string with get, set
member CommandLine : string array with get, set
member ExposeReturnCode : bool with get, set
member SummaryFormat : string with get, set
member Verbosity : string with get, set
end
AltCover.PowerShell
This is the ImportModule
option; it takes no parameters.
type PowerShell =
class
inherit Task
new : unit -> PowerShell
override Execute : unit -> bool
end
AltCover.GetVersion
This is the Version
option; it takes no parameters.
type GetVersion =
class
inherit Task
new : unit -> GetVersion
override Execute : unit -> bool
end
AltCover.Echo
Outputs a possibly coloured string of text to stdout
.
type Echo =
class
inherit Task
new : unit -> Echo
override Execute : unit -> bool
member Colour : string with get, set
[<Required>]
member Text : string with get, set
member Verbosity : string with get, set
end
AltCover.RunSettings
Used by the .net core implementation to inject an AltCover data collector, by creating a temporary run-settings file that includes AltCover as well as any user-defined settings.
Not intended for general use, but see the AltCover.targets
file for how it is used around the test stage.
type RunSettings =
class
inherit Task
new : unit -> RunSettings
override Execute : unit -> bool
[<Output>]
member Extended : string with get, set
member TestSetting : string with get, set
member Verbosity : string with get, set
end
AltCover.ContingentCopy
Used by the .net core implementation to copy files copied relative to the output directory to the same locations relative to the instrumented files folder
Not intended for general use, but see the AltCover.targets
file for how it is used around the test stage.
type ContingentCopy =
class
inherit Task
new : unit -> ContingentCopy
override Execute : unit -> bool
member RelativeDir : string with get, set
member ProjectDir : string with get, set
member CopyToOutputDirectory : string with get, set
member FileName : string with get, set
[<Required>]
member BuildOutputDirectory : string with get, set
[<Required>]
member InstrumentDirectory : string with get, set
end
AltCover.RetryDelete
Used by the .net core implementation to safely delete files
Not intended for general use, but see the AltCover.targets
file for how it is used around the test stage.
type RetryDelete =
class
inherit Task
new : unit -> RetryDelete
override Execute : unit -> bool
member Files : string array with get, set
end