简体   繁体   中英

Compiling C# projects on Linux with dependencies

I am trying to compile OpenLR on Linux (Ubuntu) using Mono, however, I run into the problem of the compiler ( xbuild ) not being able to find the project's dependency, Itinero.

I used nuget.exe to install Itinero, but it didn't work. I also tried googling for something like Classpath in C#, but found that C# doesn't have it.

Is there a way to make the xbuild see the dependencies? How can I specify the paths to the directories where those dependencies are?

You have to do a package restore:

git clone https://github.com/itinero/OpenLR.git
cd OpenLR
nuget restore OpenLR.sln
xbuild OpenLR.sln

It should compile with zero errors, there are 27 warnings that need cleaned up in the code....

Note: Make sure the you are on an updated/modern install of Mono as if you are using the default Mono package from Ubuntu you might need to update it:

Ref: http://www.mono-project.com/download/#download-lin

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM