So how to fix this if I could not resolve the Mono bug? Well, we need to find another way to compile the grammar file,
- Remove <Import Project="..\lib\ANTLR\Antlr3.targets" />.
- Add <Target Name="BeforeBuild"> to exec Antlr3.exe on Mono. This compiles Smi.g to SmiLexer.cs and SmiParser.cs.
- Include the generated files in the project.
https://github.com/lextm/sharpsnmplib/commit/e10d42dbd84e16141d345b83470ee3cb6faff022
In this way, we can still use ANTLR targets on Windows, while switching to ANTLR3 compilation on Linux/Mono. I don't plan to do anything further here, as mainly the development is on Windows.
Unfortunately, this only fixes the ANTLR compilation issue, while NuGet is another silly piece that fails to work on Mono, and when I tried to fix it a bug occurred,
http://nuget.codeplex.com/workitem/2662
Let's see if those Microsoft guys can fix it sooner.
This NuGet bug prevents NuGet packages from being restored, so if you want to compile latest #SNMP code base on Linux, you can grab the packages folder from
https://github.com/downloads/lextm/sharpsnmplib/packages.tar.gz
Decompress it, and then put the packages folder in the correct place. After that, the remaining steps are documented in KB600006 and KB600007,
http://sharpsnmplib.codeplex.com/wikipage?title=600006&referringTitle=KB
http://sharpsnmplib.codeplex.com/wikipage?title=600007&referringTitle=KB
I am going to receive my new laptop tomorrow. The development of TritonMate will be reactivated in a couple of hours.
Stay tuned.