The missing (and new) project, item, multi-project, web and multi-item dotnet new
templates for Visual Basic.
The plan is to eventually publish as nuget packages; but for now you'll need to have a local copy of the ./src
folder on your drive and manually install each package you wish to have available.
Name | Install |
---|---|
Avalonia UI Templates - Avalonia is a framework for creating cross platform UI | cd ./src/avalonia ... dotnet new install ./ |
Console (Async) | cd ./src/console ... dotnet new install ./ |
GtkSharp | dotnet new install "GtkSharp.Template.VBNet" |
Worker Service | cd ./src/worker ... dotnet new install ./ |
To manually update, you will need to change to the original folder and execute dotnet new uninstall ./
and repeat the manual install.
We can use Templates to create ready-to-run projects and items that make it easy to start with a working set of code. The .NET comes with a set of default templates to cover the essential project types and items that we may require like the Console App, Class Libraries, Windows Forms App, etc.
To see all the available templates, we can use the dotnet new
command with the list
option:
dotnet new list
This will list all built-in templates as well as the custom ones if we have installed any.
However, when you do this... you'll notice that VB isn't an available option for many of the included templates. 🤔
As a side note, you can easily filter the list to (for example) just show the available VB templates:
dotnet new list --language VB
Many of us hang out on Discord, some use this invite to join the conversations.
- Get a local copy of this repo; if you are new to git/GitHub, be sure to check out and utilize GitHub Desktop.
- Once you have the files locally, use a terminal prompt and change to the subfolder containing the template(s) you want to install. (ie.
./src/avalonia
) - From this folder, type
dotnet new install ./
; this will install the all templates from the current folder. - To uninstall (or to update),
dotnet new uninstall ./
(and to update, repeat theinstall
). - To my knowledge, these templates will be available in
dotnet new
as well as from within Visual Studio.
To make life a whole lot simpler, really need to utilize GitHub actions to automate the build process and potentially releases; so the structure of the repo needs to consider this.
Once we have something working, some testing under our belt and come up with a plan we will publish these to nuget so that they are easier to find and use by everyone. This includes such topics as versioning, release cadence, etc.
We welcome suggestions, bug reports, pull requests, help with documentation, testing, etc. So if you are interested, please use the tools here on GitHub or speak with us over on Discord.
Here are some helpful links for how to create templates from scratch...
- How to create your own templates for dotnet new
- Custom templates for dotnet new
- Create templates for the CLI (Tutorial)
- What are project and item templates?
- Locate and organize project and item templates
- How to Create Your .NET Project Template
- Creating .NET Project Templates
Drop down to a terminal prompt and type dotnet new list
... see one that doesn't have VB
next to it? Sounds like a candidate...
Check out the list of additional C# and F# templates that can be found at https://github.com/dotnet/templating/wiki/Available-templates-for-dotnet-new for a bit of inspiration.