Closed amoldeshpande closed 3 years ago
Hello,
apologies for the late reply.
As far as I understand, you want the following:
.licenseheader
file. You want to have license headers automatically inserted upon the creation of a new file..licenseheader
file. You do not want to have any license headers inserted when creating new files.If there is no .licenseheader
file in a project (and also no solution-wide .licenseheader
file!), the License Header Manager extension does not do anything when you create a new file - despite having the option Automatically insert license header in new files
turned on.
I have just tested and was able to confirm this behaviour in Visual Studio 2019 an LHM 3.0.3.
I hope, I understood your inquiry correctly. If not, could you please provide an example (including your Visual Studio version) that shows what you are doing, what you are experiencing and how that differs from what you want to achieve?
Best regards, Raffael
ok, thanks. That answers my question.
The existence of a "default header" option in Visual Studio Tools->Options probably made me think there would be a header always inserted.
It's also a bit confusing because with the Automatically insert license header in new files
option turned off, my personal project still gets license headers inserted, probably because there is a .licenseheader file present in the solution.
If a .licenseheader file is the controlling factor in all instance, perhaps the option would be better placed there ? Or maybe some text in the settings that describes what happens.
It seems like a trivial thing, but license header insertion causes a several-second lag in my Visual Studio, so it's not something I enjoy turning off and on to test various permutations :-)
thanks!
Hello,
I'm glad that answers you questions - I will close the issue for now.
Best regards, Raffael
These days I find myself working on a personal project as well as another open source project. For my own project, I want to have the license header inserted automatically with every new file.
With the open source project, I do not want it to insert any header. I could define a license header for this solution as well, but often times that's not practical since everyone may not have the extension or even be using Visual Studio for that matter.
If it is too hard to do a per-solution setting in Visual Studio, if this is a field in the .licenseheader file that would be ok. I can create a .gitignored .licenseheader locally for the open source repo.