xpybuild.targets.csharp

Contains xpybuild.targets.csharp.CSharp for compiling C# files to an executable or library.

CSCProcessOutputHandler

class xpybuild.targets.csharp.CSCProcessOutputHandler(name, treatStdErrAsErrors=True, **kwargs)[source]

Bases: xpybuild.utils.outputhandler.ProcessOutputHandler

A ProcessOutputHandler that can parse the output of the CSC compiler.

Subclasses must pass any **kwargs down to the super() constructor to allow for new functionality to be added in future.

Parameters
  • name – a short display name for this process or target, used as a prefix for log lines.

  • treatStdErrAsErrors – controls whether all content on stderr (rather than stdout) is treated as an error by default. The correct setting depends on how the process being invoked uses stdout/err.

  • options – a dictionary of resolved option values, in case aspects of this handler are customizable. Available to implementations as self.options (if None is passed, self.options will be an empty dictionary)

CSharp

class xpybuild.targets.csharp.CSharp(output, compile, main=None, libs=None, flags=None, dependencies=None, resources=None)[source]

Bases: xpybuild.basetarget.BaseTarget

Compile C# files to produce an executable or library file.

Parameters
  • output – the resulting .exe or .dll

  • compile – the input PathSet, path or list of .cs file(s)

  • main – The main class to execute if an exe is to be built. If this is set then an executable will be created. Otherwise this target will build a library.

  • libs – a list of input libraries (or a PathSet)