admin管理员组

文章数量:1415420

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?

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?

Share Improve this question asked Feb 11 at 11:20 SBATSBAT 516 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

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 the PATH or NUGET_ID provided.

To install a custom template from your Azure DevOps repository, you can follow these steps:

  1. Clone the repository locally by running git clone <Azure DevOps Repo URL>.
  2. Navigate to the template directory or copy the template to your target directory.
  3. Install the template from the local directory. dotnet new install .

本文标签: