dimanche 26 avril 2015

Mono C# compiler response file syntax


I have a basic foundation in C#, having used it briefly at a previous job. Right now I'm working on really understanding the language and its paradigms by going through Pro C# 5.0 and the .NET 4.5 Framework. However, my main computing environment is a GNU/Linux system so I'm doing this using Mono.

That said I'm running into a problem using the mono C# compiler (mcs) to run a build using a response file (.rsp). Where can I find documentation about how mono parses these files and the syntax it expects?

Mostly I've run into not knowing how to specify a comment (the # symbol which is a comment under the Microsoft implementation seems to be interpreted as a file by mcs), and not knowing how to specify the options themselves.

# TestApp.rsp
-r:System.Windows.Forms.dll
-target:exe -out:TestApp.exe *.cs

When compiled:

$ mcs @TestApp.rsp
error CS2001: Source file `#' could not be found
TestApp.rsp(2,0): error CS1024: Wrong preprocessor directive
TestApp.rsp(2,0): error CS1525: Unexpected symbol `-'
Compilation failed: 3 error(s), 0 warnings


Aucun commentaire:

Enregistrer un commentaire