❔ Error whilst creating new project

Hey everyone. I get this error every time I try to create a new project using dotnet and the template avalonia.mvvm:
Unable to locate the specified template content, the template cache may be corrupted. Try running 'dotnet Microsoft.TemplateEngine.Cli.CommandParsing.BaseCommandInput --debug:reinit' to fix the issue.
Unable to locate the specified template content, the template cache may be corrupted. Try running 'dotnet Microsoft.TemplateEngine.Cli.CommandParsing.BaseCommandInput --debug:reinit' to fix the issue.
I tried running the command but it isnt recognized by dotnet as a valid command. Is there another way of reloading the template cache? things I've tried: -restarting -reinstalling the dotnet-sdk package I'm on arch linux btw and installed dotnet using pacman (i.e. native package).
17 Replies
phaseshift
phaseshift2y ago
Which SDK did you install?
Hinterhältiger
HinterhältigerOP2y ago
6.0
phaseshift
phaseshift2y ago
Did it install to a different place than pre-existing dotnet/did you change dotnet_root env var? I'm just guessing at things. Don't know how it's meant to be
Hinterhältiger
HinterhältigerOP2y ago
not that i would know. I installed it without any extra perameters (eg. pacman -S dotnet-sdk-6.0). which dotnet returns /usr/bin/dotnet that should be the default install directory
phaseshift
phaseshift2y ago
What about dotnet --list-sdks And what template are you trying to create?
Hinterhältiger
HinterhältigerOP2y ago
dotnet --list-sdks returned one sdk. 6.0.114 [/usr/share/dotnet/sdk] avalonia.mvvn but other templates work. Sorry that I just realized it now
phaseshift
phaseshift2y ago
Did you run an extra step to install avalonia templates?
Hinterhältiger
HinterhältigerOP2y ago
no. I used dotnet new avalonia.mvvm -o example
phaseshift
phaseshift2y ago
That is not a normal bundled template afaik.
Hinterhältiger
HinterhältigerOP2y ago
yes. you have to install it from the avalonia guthub
Hinterhältiger
HinterhältigerOP2y ago
GitHub
GitHub - AvaloniaUI/avalonia-dotnet-templates: Avalonia Templates f...
Avalonia Templates for dotnet new. Contribute to AvaloniaUI/avalonia-dotnet-templates development by creating an account on GitHub.
mtreit
mtreit2y ago
dotnet new will list the available templates
Hinterhältiger
HinterhältigerOP2y ago
yes. avalonia.mvvm is a valid template in dotnet new --list
Hinterhältiger
HinterhältigerOP2y ago
Angius
Angius2y ago
You sometimes call it mvvn in your messages Make sure you're not misspelling it like that when using the command
Hinterhältiger
HinterhältigerOP2y ago
yeah, no, I didnt misspell it in the command but thanks
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server