Caching issue impacting local folder templates
See original GitHub issueThere is some caching issue happening that is impacting local template dev experiences. I’ve noticed that when I create a template that doesn’t have any symbols, after adding symbols later they are not properly detected. Try these steps.
- Create a project template in a folder that doesn’t have any symbols
- Install the template with
dotnet new --install [folder-path]
- Modify source template to have one or more symbols
- Uninstall the template with
dotnet new --uninstall [folder-path]
- Install the template with
dotnet new --install [folder-path]
- Run template specific help with
dotnet new [template-name] -h
When you run the help, you’ll notice that the parameters appear but the names for the options will not appear on the left side of the descriptions. If you try to execute the template and pass in a param it will fail.
To fix this sometimes you can change the id of the template, but in other cases you’ll need to actually move the template to another folder to get it to install correctly. I have a video below showing you what happens, but you can also see that I ran into this issue when I was presenting at dotnet conf. Here are the timestamps where I ran into this.
https://user-images.githubusercontent.com/1283154/143909623-3e97db57-41da-47ae-bf54-0f6c10a59a4e.mp4
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (7 by maintainers)
Top GitHub Comments
@sayedihashimi apologies, it is
--debug:rebuildcache
(without dash).@ajdvoynos the change wad done only in .NET 7. It was not backported to .NET 6 unfortunately.