Scanning a directory that contains a .dll results in the directory and all files being deleted
See original GitHub issueWhen a directory is passed to the TemplateCache Scan method, and a subdirectory contains .dll files, then the directory and all files are deleted. When scanning a directory this should not happen since this may contain the original project and associated template files.
I created a simple console app that uses the IDE Bootstrapper to reproduce the problem:
https://github.com/mrward/TestDotNetTemplateInstaller
Building and running this console application results in the TestDotNetTemplateInstaller project directory being deleted. This was tested on the Mac with Mono 5.4.
Debugging the TemplateCache what happens is that when a .dll file is found then the directory is deleted in the ScanForComponents method.
The dotnet cli does not seem to have the same problem. Running dotnet new -i /path/to/template
using a directory that has a template.json but also .dll files in a subdirectory works as expected and no project files are removed.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
@mrward - I’ve merged a fix for this into rel/2.1.0_preview-1, please let me know if you have additional problems.
Closing this since the fix has been merged