visual studio - Microsoft C# command line compiler not finding .dll in external directory -


i compile c# program command line in linux terminal. csc.exe added path , works correctly. directory layout follows:

|-- program.cs |-- otherfiles.cs |-- bin |    |-- debug |    |    |-- newtonsoft.json.dll 

from top directory, use following command compile:

csc *.cs /r:./bin/debug/newtonsoft.json.dll --> error cs2001: source file 'r:bin/debug/newtonsoft.json.dll' not found 

is there better way i'm trying here, or have copy .dll files want same directory program.cs, done in this question?

the /reference argument used indicate name of assembly.

to specify additional directories search assembly files use /lib argument:

csc *.cs /r:newtonsoft.json.dll /lib:"./dir spaces/need quotes", ./bin/debug 

use /lib specify directory in 1 or more of assembly references located. /lib topic discusses directories in compiler searches assemblies.


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

Nuget pack csproj using nuspec -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -