Multi-Target Project Template - How to get the child projects to rename RRS feed

  • Question

  • Hello,

    I'm trying to follow this MSDN article. http://msdn.microsoft.com/en-us/library/ms185308.aspx

    I'm creating a WCF solution with 8 projects in it to use as a ProjectTemplate.

    The problem I'm having is figuring out how to get child projects to take on the name I use when I create a new solution for the template.

    For example, I have a WCFSolution.BLL project in the Project Template I've created.

    My root template is called WCFSolution.vsTemplate

    <VSTemplate Version="2.0.0" Type="ProjectGroup"
     <Description>WCF multi-project solution</Description>
      <ProjectTemplateLink ProjectName="WCFSolution.BLL">
      <ProjectTemplateLink ProjectName="DALTemplate">
      <ProjectTemplateLink ProjectName="DataContractsTemplate">
      <ProjectTemplateLink ProjectName="MessageContractsTemplate">
      <ProjectTemplateLink ProjectName="ProviderContractsTemplate">
      <ProjectTemplateLink ProjectName="WebSvcTemplate">
      <ProjectTemplateLink ProjectName="ServiceContractsTemplate">
      <ProjectTemplateLink ProjectName="ServiceImplementationTemplate">

    I go into Visual Studio after adding the Template and I want to create a new solution.  If I name the new solution NST

    I want WCFSolution.BLL to become NST.BLL.

    I've expermented with the $ $ parameters but no luck.

    So the question is how do you create a Multi-Target Project Template so that when you use the template to add a new Solution, whatever you name the solution gets used as a prefix in your Templates project names.

    Obviously I want each projects Namespace to reflect this as well.

    Now if I create a single Project and call is say WCFSolution.BLL and export it.

    Then if I import it and create a new solution and use the this template which is a single project, if I name the solution NST, then the project gets created as NST.BLL like I want.

    However, I'm just not having any luck in the multi-target scenario.


    Monday, February 28, 2011 12:50 AM


All replies