Hi,
I have a template where i have two projects
Lets say Project1 , Project 2
I am using customparameters.
Attached is the .vstemplate I am using
<VSTemplateVersion="2.0.0"Type="ProjectGroup"xmlns="http://schemas.microsoft.com/developer/vstemplate/2005"><TemplateData><Name>TestFormat</Name><Description>An example of a multi-project template</Description><ProjectType>CSharp</ProjectType></TemplateData><TemplateContent><ProjectCollection><ProjectTemplateLinkProjectName="$safeprojectname$"> TestFormat\MyTemplate.vstemplate</ProjectTemplateLink><ProjectTemplateLinkProjectName="$safeprojectname$Application" variable=$Myvaraible$> TestFormatApplication\MyTemplate.vstemplate</ProjectTemplateLink></ProjectCollection>
<CustomParameters><CustomParameter Name="$FormatCode$" Value="$safeprojectname$"/> </CustomParameters><ProjectItem ReplaceParameters="true"> default.cs</ProjectItem>
</TemplateContent></VSTemplate>
The issue I have is that I would like to set a varaible(variable=$Myvaraible$)
maybe in the second project that is the name of the first project. So that when i create the template and the second project is initialised , I can set that variable in a code behind file.
Is there such a thing as global variable I can set and read ?
So if the code behind had something like
$Myvariable$.GetItemList();
it would put the name of the required project name.
Thanks