0

Using Visual Studio (VS) 2015 I created a Project Template (.VSTemplate) for our development group. This is to be used for all new VS projects. I have the default project name correctly entered in the .vstemplate thusly:

<TemplateData>
    ...
    <DefaultName>Start</DefaultName>
    <ProvideDefaultName>true</ProvideDefaultName>
    ...

All new projects should have "Start" for the Name on the New Project form.

Example

However, when I start a new project from this template it adds an auto-generated number at the end of the name making it "Start1".

Does any Visual Studio wizard out there know of a switch or setting to disable this auto-numbering?

Thank you for any assistance, this community is outstanding!

Binary1
  • 11
  • 4
  • That is just a suggestion that your Project should have a Title name. For example, If you were working on a generic programming, you can change the Start1 to "Generic" and also its directory. Next time it will default to Generic. So you can rename it while creating the program. – Juniar Jul 13 '17 at 02:14
  • Thank you @Juniar for the input and I agree with your suggestion if it were not a requirement for all new applications to be called "Start". I should provide more information. Our development group requires this to default as "Start" to keep it consistent across all apps (we wish it could be hard-coded!) Since this is the base project title for all of our projects, (I won't go into the detail behind why) but suffice to say we need it to default to "Start". – Binary1 Jul 19 '17 at 13:40
  • You cannot save Two files or directories with the same name on the same directory. This causes an error message that such a file already exist unless you want to replace the current file with this. So that is not possible. However you can save Two or more files with the same name on different directories. So change the locations/directories. Now, If you want to call each application Start. Just change the "Start1" to "Start" then save it. However you have to change the directory paths and save it on another path as "Start". – Juniar Jul 19 '17 at 23:58
  • I believe this is getting off topic. I do not want to save two different files in the same directory. I want Visual Studio to DEFAULT to show "Start" in the NAME field and the SOLUTION field. Please see the screen capture reference. – Binary1 Jul 21 '17 at 03:55
  • Okay, I think you can write your own Template then pass that in to replace the current template being used. Also I would search and download a new Template that might have such a feature if you cannot implement one. There are many MSVC Templates online. – Juniar Jul 21 '17 at 17:44
  • @Juniar, correct, I did write my own template as noted above in the description. I also changed the .vstemplate value for Start. It does change the default value, but ADD's a "1" at the end, like this "Start1" – Binary1 Jul 21 '17 at 20:35
  • @Binary1 did you solve this issue, lol.. is this already possible without visual studio template files but by using: https://github.com/dotnet/templating ? – Rampage64 May 27 '22 at 15:19
  • This post can be removed as I no longer have this requirement. – Binary1 Jun 01 '22 at 00:10

0 Answers0