Visual Studio Development Bookmark and Share   
 index > Visual Studio Guidance Automation Toolkit > renaming projects
 

renaming projects

how can I change the name of some projects that are present under one solution?
Aka Avik  Tuesday, July 03, 2007 11:28 AM
something like this (below).. if u look at the parameters for whatever action u want to call u'll figure it out...

Code Snippet


<Recipe Bound="false" Name="MyReceipe" xmlns="http://schemas.microsoft.com/pag/gax-core">
<Types>
<xi:include href="TypeAlias.xml" xmlns:xi="http://www.w3.org/2001/XInclude" xpointer="xmlns(gax=http://schemas.microsoft.com/pag/gax-core) xpointer(gax:Types/gax:TypeAlias)" />
</Types>
<Caption>Gets the current project and passes it to my action </Caption>
<Description></Description>
<HostData>
<Icon ID="4005"/>
<CommandBar Name="Project" />
<CommandBar Name="Project Add" />
</HostData>
<Arguments>
<!-- Gets the currently selected project -->
<Argument Name="CurrentProject" Type="EnvDTE.Project, EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.FirstSelectedProject, Microsoft.Practices.RecipeFramework.Library, Version=1.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</Argument>
</Arguments>
<Actions>
<Action Name="MyAction"
Type="MyActions.MyAction">
<Input Name="Project" RecipeArgument="CurrentProject" />
</Action>
</Actions>
</Recipe>

mickdelaney  Friday, July 06, 2007 8:08 AM

if u want to rename the current project u could use the FirstSelectedProject value provider to get the selected project, use a wizard and gather the new name then execute the RenameProjectAction. they're all out of the box in the assembly

Microsoft.Practices.RecipeFramework.Library. e.g.

<Argument Name="CurrentProject" Type="EnvDTE.Project, EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">

<ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.FirstSelectedProject, Microsoft.Practices.RecipeFramework.Library, Version=1.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

</Argument>

mickdelaney  Tuesday, July 03, 2007 1:29 PM

Thanks for reply.

"use the FirstSelectedProject value provider" - how to use?? not very much clear.

Aka Avik  Friday, July 06, 2007 6:25 AM
something like this (below).. if u look at the parameters for whatever action u want to call u'll figure it out...

Code Snippet


<Recipe Bound="false" Name="MyReceipe" xmlns="http://schemas.microsoft.com/pag/gax-core">
<Types>
<xi:include href="TypeAlias.xml" xmlns:xi="http://www.w3.org/2001/XInclude" xpointer="xmlns(gax=http://schemas.microsoft.com/pag/gax-core) xpointer(gax:Types/gax:TypeAlias)" />
</Types>
<Caption>Gets the current project and passes it to my action </Caption>
<Description></Description>
<HostData>
<Icon ID="4005"/>
<CommandBar Name="Project" />
<CommandBar Name="Project Add" />
</HostData>
<Arguments>
<!-- Gets the currently selected project -->
<Argument Name="CurrentProject" Type="EnvDTE.Project, EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.FirstSelectedProject, Microsoft.Practices.RecipeFramework.Library, Version=1.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</Argument>
</Arguments>
<Actions>
<Action Name="MyAction"
Type="MyActions.MyAction">
<Input Name="Project" RecipeArgument="CurrentProject" />
</Action>
</Actions>
</Recipe>

mickdelaney  Friday, July 06, 2007 8:08 AM
thanks a lot... Now got it.
Aka Avik  Friday, July 06, 2007 9:05 AM

You can use google to search for other answers

Custom Search

More Threads

• Guidance package solution lost recipes
• Access Denied error on Install of Feb GAT
• Error while displaying the Current Project name in a Text box of a Custom Wizard Page
• Guidance Package Build
• code writing
• Queued Recipe Execution
• How can you use T3 templates in VS templates???
• Strong-Naming Guidance Package problem?
• GAT
• Action Condition