I am using VS 2015 templates to create a project for me, within my C# classes I have substitutions like $projectname$
and they work great if I name my project like
If you just want to generate a valid class name based on the project name, instead of creating a custom template parameter, you can change $projectname$
to $safeprojectname$
, which is documented as:
The name provided by the user in the New Project dialog box, with all unsafe characters and spaces removed.