views:

253

answers:

1

Just setting up some quick class and object item templates and all is working great so far, but one thing I'm stuck on is the $safeprojectname$ template parameter.

I've added this as part of the namespace portion and the $registeredorganization$ is working fine

namespace $registeredorganization$.$safeprojectname$
{
    public class $safeitemname$
    {
        public $safeitemname$() 
        {
            //default constructor
        }
    }   
}

And I've gone into the .vstemplate file and made sure ReplaceParameters="true" so the only thing I guessed at this point is the period between the company and project name, so I tested this out and just for laughs removed the period, still no go. Anyone have any insight as to why this isn't working?

EDIT: I'll accept Jared's answer as it answers my core question "why isn't it working?" but I am adding this follow up to show how I got my desired result. Instead of using the $safeprojectname$ or $projectname$ I found that using $rootnamespace$

namespace $registeredorganization$.$rootnamespace$

or depending on how your project is named:

namespace $rootnamespace$

works as I had wanted, just added this for anyone else who may come across this issue.

+1  A: 

The $safeprojectname$ template replacement macro is only available from the New Project Dialog. It will not work for anything added as in individual item.

Reference: http://msdn.microsoft.com/en-us/library/eehb4faa(VS.80).aspx

JaredPar
added update to parent with way to get desired result
curtisk