If I create an item template with default name foo.txt
, Visual Studio by default offers the name foo1.txt
in the add new dialog, even if there is no foo.txt
in the folder.
This is normally fine, but I would need to create an item template, that does not offer a "1" suffix for the file name by default, exactly like the App.config
template behaves.
I have checked the App.vstemplate
file in the VS2019 installation, but I don't see any special setting that would cause this behavior.
Sample:
<?xml version="1.0" encoding="utf-8"?>
<VSTemplate Version="3.0.0" Type="Item" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">
<TemplateData>
<DefaultName>foo.txt</DefaultName>
<Name>Foo.txt file</Name>
<Description>A foo.txt.</Description>
<ProjectType>CSharp</ProjectType>
</TemplateData>
<TemplateContent>
<ProjectItem>foo.txt</ProjectItem>
</TemplateContent>
</VSTemplate>