The VS IDE does not contain the Antlr4 Console App template automatically. And it is for dotnet cli project template automatically(using command line to create).
If you want to create Antlr4 Console App template for VS IDE, you should follow these steps:
1) open CMD as Administrator and then type this to create the template for dotnet cli:
dotnet new -i Antlr4BuildTasks.Templates::8.9.1
then,
cd xxxx(a default empty folder which for the created project by dotnet cli)
dotnet new antlr
2) open the created antlr project by VS IDE
After that, click VS top menu Project-->Export Template-->Project Template
Input the info like my description and then click Finish.
3) Close VS, copy the generated Antlr4 Console App.zip
file into C:UsersxxxDocumentsVisual Studio 2019TemplatesProjectTemplatesVisual C#
:
4) restart VS and click new project.
For newly added templates, VS search and location are not too accurate, so often the template is at the end of the search results,
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…