Avalonia Templates Install Errors

I'm following the official Get Started->Install guide on the Avalonia website, and it tells me to run:
dotnet new install Avalonia.Templates
dotnet new install Avalonia.Templates
This gives several complaints about "It is only possible to use this template with SDK-style projects". The full output of this command can be seen here: https://pastebin.com/9xMgCran Then I'm told, "To list the installed templates run dotnet new list". According to the guide I should see these templates:
Avalonia App
Avalonia MVVM App
Avalonia Cross Platform Application
Avalonia Resource Dictionary
Avalonia Styles
Avalonia TemplatedControl
Avalonia UserControl
Avalonia Window
Avalonia App
Avalonia MVVM App
Avalonia Cross Platform Application
Avalonia Resource Dictionary
Avalonia Styles
Avalonia TemplatedControl
Avalonia UserControl
Avalonia Window
I have a lot of other, unrelated templates installed, so when I run dotnet new list I obviously won't only see Avalonia templates, but I do only see these Avalonia templates included in all my installed templates:
Avalonia .NET App
Avalonia .NET MVVM App
Avalonia Cross Platform Application
Avalonia .NET App
Avalonia .NET MVVM App
Avalonia Cross Platform Application
I do have these SDKs installed:
8.0.408 [C:\Program Files\dotnet\sdk]
9.0.201 [C:\Program Files\dotnet\sdk]
8.0.408 [C:\Program Files\dotnet\sdk]
9.0.201 [C:\Program Files\dotnet\sdk]
Any advice on why all the templates won't install would be greatly appreciated.
Pastebin
Avalonia Template Install Problems - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
9 Replies
sibber
sibber2d ago
well, thats not an error its warning you why you wont be able to see them outside a project they should be visible if you create an avalonia project oh and non sdk style projects are ancient and shoulsnt be used youd have to try hard to create a project the uses them anyway
VoidPointer
VoidPointerOP2d ago
Nonetheless, something is amiss because they say I should see 8 templates with dotnet new list and I only see 3. But I'll ignore that and only post another question if I encounter any problems doing the UI.
sibber
sibber2d ago
could be that that was tge case in an older version od the cli the avalonia docs arent always the most up to date
leowest
leowest2d ago
they are 8 templates, 4 for c# and 4 for f# plus templates for items
leowest
leowest2d ago
No description
leowest
leowest2d ago
No description
leowest
leowest2d ago
and via cli it only lists 3, for c# and f#
leowest
leowest2d ago
No description
leowest
leowest2d ago
I would imagine the Avalonia Project is special because it has a wizard so ide only that would make the count right for cli as I understood

Did you find this page helpful?