LaubPlusCo/LaubPlusCo.Helix.VsTemplates

Issue changing template path in .helixtemplates file

Closed this issue · 3 comments

I wanted to keep the example templates the plugin installs, so I renamed the folder they're in to "Example Helix Templates". I then created a new folder "HelixTemplates", and created a template within that directory. I don't want to confuse my fellow devs with choice!

I edited the .helixtemplates file in Notepad++ and set the templates.modules.folder setting to \helixtemplates. However, when I go to use the plugin the folder it uses is still the Example Helix Templates, and something sets the templates.modules.folder setting in the .helixtemplates file to \Example Helix Templates!

It almost looks like there's a file-system watcher that is overwriting the setting I manually entered in the .helixtemplates file?

I have resolved this by renaming 'Example Helix Templates', and by moving the templates within, rather than the whole folder. But it seems kind of strange.

Actually, I'm wondering if this relates to the Template Folder Service - https://github.com/LaubPlusCo/LaubPlusCo.Helix.VsTemplates/blob/master/VisualStudio/Dialogs/Model/TemplateFolderService.cs

If this is searching for the template folder alphabetically, then my "Example Helix Templates" will come before the "HelixTemplates" folder.

It might actually be better to not search. Let users enter a path for their project. If that path is wrong/doesn't exist/etc., then error. Just a thought.

I think you are right that this is a bug in the current release in the template folder service. It should not be able to occur in the upcoming release that I am making public later today. Now the locate method should not be called if there already is a valid folder path in the solution scope settings file.

This should have been solved in current release.