Search code examples
c#xsltcruisecontrol.net

How do I configure CruiseControl's C# version for XSLT code snippets?


I am trying to set up a CruiseControl.NET instance that displays some of its build results with custom XSLT that includes C# snippets.

This used to work on another instance (whose configuration is not available to me anymore - I just have the original XSLT files), but the current instance complains about certain "more recent" C# keywords such as var.

This makes me think that the XSLT processor used by CC.NET is currently using an old C# compiler. Unfortunately, I cannot find any hints or documentation on how to modify that behaviour.

Is there any option in CC.NET to determine which C# language version/compiler is used by the XSLT processor?


Solution

  • In the end, it turned out to be a matter of:

    • targetting CC.NET to a recent .NET version
    • configuring the AppPool in IIS to use .NET 4 and
    • making the target version explicit in the Web.config file of the CC.NET web dashboard by writing something like <compilation defaultLanguage="c#" targetFramework="4.7.2"/>