Problem:
I'm trying to install a custom template using the
dotnet new -i command <Azure DevOps Repo URL>
from a private Azure DevOps Git repository, but I’m encountering the error:
'url' is not supported
but when i try to clone the same repo i don't encounter any problem.
What am I missing? How can I fix this issue and properly install the template from my Azure DevOps repository using dotnet new?
The error you're encountering is because the dotnet new -i
command does not support installing templates directly from a URL.
According to dotnet new install,
The
dotnet new install
command installs a template package from thePATH
orNUGET_ID
provided.
To install a custom template from your Azure DevOps repository, you can follow these steps:
git clone <Azure DevOps Repo URL>
.dotnet new install .