safeitemrootname is not mentioned but used in the standard templates
âš Dit gedeelte niet bewerken. Het is vereist om problemen te koppelen tussen docs.microsoft.com en GitHub.
@DaanV2 Thanks for bringing this to our attention.
@DaanV2 Is safeitemrootname the same as safeitemname without the file extension?
I have both of them in an item template and got the following:
It takes the file name of the item and replaces all dangerous characters away.
Example: in this template, I create a file through the following:
The name of the item that I filled in.
TestClass.cs
The file that is created through the MyTemplate.vstemplate:
<ProjectItem TargetFileName="$fileinputname$ - Initialize.cs" ReplaceParameters="true">Class - Initialize.cs</ProjectItem>
Creates a file called:
TestClass - Initialize.cs
both $safeitemrootname$ and $safeitemname$ got renamed to:
TestClass___Initialize
I tested this also on an item template that generates 3 files and had each of the 3 files add in both safeitemrootname and safeitemname.
It seems that it is always converted to the same.
@DaanV2 Thanks for providing that info. If you want to add $safeitemrootname$ to the doc (click Edit on the upper right) feel free to, otherwise I'll add it to our backlog.