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.
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,
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
Decompress it, and then put the packages folder in the correct place. After that, the remaining steps are documented in KB600006 and KB600007,
I am going to receive my new laptop tomorrow. The development of TritonMate will be reactivated in a couple of hours.