ANTLR cannot generate ‘org.antlr.v4.codegen.CSharp_v4_5_1Target’ code as of version 4.1-SNAPSHOT

Today I tried to create an ANTLR 4 grammar and compile it to C#. Of course, I used Sam Harwell’s C# target for ANTLR 4. I followed all instructions, added my grammar file, compiled it and got the following error:

ANTLR cannot generate ‘org.antlr.v4.codegen.CSharp_v4_5_1Target’ code as of version 4.1-SNAPSHOT

So what’s the problem? Continue reading