I would like to compile a C# program from the command line in a Linux terminal. My csc.exe is added to my Path and works correctly. The directory layout is as follows:
|-- Program.cs
|-- Otherfiles.cs
|-- bin
| |-- Debug
| | |-- Newtonsoft.Json.dll
From the top directory, I use the following command to compile:
csc *.cs /r:./bin/Debug/Newtonsoft.Json.dll
--> error CS2001: Source file 'r:bin/Debug/Newtonsoft.Json.dll' could not be found
Is there a better way to do what I'm trying to do here, or will I just have to copy the .dll files I want into the same directory as Program.cs
, as is done in this question?