Home Forums Legacy SDKs Compile with command line: error CS0009

Tagged: , ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #2814
    Dieter Merkel


    i am working with c# and i have one file with uses the TobiiGazeCore32.dll.

    When i try to compile it via the command line:

    csc /r:TobiiGazeCore32.dll Test.cs

    i get the error:

    fatal error CS0009: [...] - An attempt was made to load a program with an incorrect format.

    I googled and found out that (maybe) i have to try something like this:

    csc /r:TobiiGazeCore32.GazeData.dll Test.cs

    but this did not helped. The error i get if i do this is that TobiiGazeCore32.GazeData.dll could not e found.

    Is there a way to compile my test project via the command line ?

    All the cs files and the dll are in one folder. I use the Gaze SDK with Framework 4 (but tried the same with Framework 2)


    Hi Dieter,
    the reason you cannot reference the TobiiGazeCore dll when compiling is because it isn’t a .NET assembly; it’s a native dll. You should reference the .NET binding assembly instead (Tobii.Gaze.Core.Net.dll). The native dll will be loaded at runtime via P/Invokes so make sure it ends up in the same directory as the executable file.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.