FIX4.00.03 · Released 27 September 2023
High Importance
FIXfinPOWER Connect
Released in
4.00.03
27 September 2023
  1. Opened9 Aug
  2. Closed10 Aug
  3. Released27 Sep
Article 20561 Job J031764

Scripting; C#; Script does not compile if if includes "#reference" directive or "using" statements

C# (C sharp) Scripts that included either a "#reference" directive or a "using" statement failed to compile.

Compile errors may include the following (or similar):

  • Preprocessor directive expected
  • Single-line comment or end-of-line expected
  • Invalid token "using" in class, struct, or interface member declaration
  • Invalid token ";" in class, struct, or interface member declaration

For example, the following Script code would not compile:

#reference "System.Core"

using System.Linq;

public bool Main(ISKeyValueList parameters) {
  // Assume Success
  bool Success = true;

  // Function should return a Boolean value indicating success
  return Success;
}

NOTE: LINQ support does not require any references or imports from version 4.00.03