I want to install Antlr4 Console App template mentioned in here,and nuget console tell me that I install it sucessfully.
But I can't find this template in create new project menu. enter image description here
And I try to install it again,but nuget tell me "The template "Antlr4 Console App" was created successfully."
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:\Users\xxx\Documents\Visual Studio 2019\Templates\ProjectTemplates\Visual 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,