locked
Feature builder with multi-project Template RRS feed

  • Question

  • I have a Feature extension which uses guidance to create a specific type of Solution. The solution is composed by 3 projects available through a solution template. The problem that I have is that the .vstemplate don't get the value of the variables I am using in the Wizard created using a VS Template Launch Point.

    The flow is in this way:

    1. Before Unpack command opens a Custom Windows Form
    2. In the Windows Form I am using FeatureCallContext.Current.TemplateeplacementsDictionary.Add to save the variables values
    3. I assigned the variables in the .vstemplate files
    4. They are not read at all by VS as the projects are named MyProject which is a value I don't use ...
    Any idea or any template that show me how I can accomplish this? I want to accomplish the same thing done in GAX by pattern and practices where, through a Wizard they change namespace and name of the project created in Visual Studio.


    MCAD - MCSD MCTS Sharepoint 2007 MCTS SQL Server 2005 blog: http://blog.raffaeu.com "If my answer is useful remember to mark it as useful".
    Monday, November 22, 2010 1:01 PM

Answers

  • This looks like a bug in that we're not keeping customizations and re-applying them to multiple project unfolds.

    I will get this added to the list of bugs for a future update.

    Friday, January 14, 2011 9:47 PM
    Moderator

All replies

  • What I am able to do is this:

    If I pass the variable from the beginning, it works:

     

    		<SolutionFolder Name="Core">
    		<ProjectTemplateLink ProjectName="$CoreName$">
    			Smart_Module\MyTemplate.vstemplate
    		</ProjectTemplateLink>
    

    If I use the variable inside the project .vstemplate it works, like in this way:

     

    <TemplateContent>
     <Project TargetFileName="$CoreName$.csproj" File="CAB.SmartModule.csproj" ReplaceParameters="true">
    
    As soon as I try to access the variable in one the VS file, it doesn't work as it should ...

     


    MCAD - MCSD MCTS Sharepoint 2007 MCTS SQL Server 2005 blog: http://blog.raffaeu.com "If my answer is useful remember to mark it as useful".
    Monday, November 22, 2010 1:51 PM
  • This looks like a bug in that we're not keeping customizations and re-applying them to multiple project unfolds.

    I will get this added to the list of bugs for a future update.

    Friday, January 14, 2011 9:47 PM
    Moderator