Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to resolve problem with a warning of dotnet new "Failed to scan..."?

I am learning how to create an item template for dotnet new. After some exercises, I cannot resolve a warning (look at line 3):

PS C:\Users\abrakadabra\repos\magic\templates> dotnet new install .\magic.templates.builders.id\
The following template packages will be installed:
   C:\Users\abrakadabra\repos\magic\templates\magic.templates.builders.id\

Warning: Failed to scan C:\Users\abrakadabra\repos\parent_folder\working\templates\MyProject.Con.
Details: Template package location C:\Users\abrakadabra\repos\parent_folder\working\templates\MyProject.Con is not supported, or doesn't exist.
Success: C:\Users\abrakadabra\repos\magic\templates\magic.templates.builders.id\installed the following templates:
Template Name               Short Name      Language  Tags
--------------------------  --------------  --------  ----------------------
Magic ID Builder            mgctestbuildid  [C#]      Common/Code/Magic

What to do in that case?

like image 435
Gerard Jaryczewski Avatar asked Sep 16 '25 13:09

Gerard Jaryczewski


1 Answers

Because I was following the tutorial, I was using some mentioned example folders, like parent_folder and working. After the exercises, I removed these folders. But dotnet new was looking for them when I tried installing the next new templates.

You can use dotnet new uninstall to list all the paths for local templates which can be removed and then fix or remove the paths.

When I remove the mentioned one, the warning disappeared. In my example I executed:

dotnet new uninstall 'C:\Users\abrakadabra\repos\parent_folder\working\templates\MyProject.Con'
like image 57
Gerard Jaryczewski Avatar answered Sep 19 '25 03:09

Gerard Jaryczewski