Hi Nima_DK
I tried overriding Microsoft.Practices.RecipeFramework.Library.Actions.AddItemFromStringAction and wrote the following in the execute override
public override void Execute()
{
System.Diagnostics.Debug.Assert(false); //for attchiing the debugger
//add a folder with the required name
EnvDTE.ProjectItem folder = this.Project.ProjectItems.AddFolder(TargetFileName, "");
TargetFileName + =".cs";
//now add the file by calling base.execute. this will add directly in proejct
base.Execute();
// Lets move the file in the created folder
Microsoft.Practices.RecipeFramework.Library.Solution.Actions.MoveProjectItemAction m = new Microsoft.Practices.RecipeFramework.Library.Solution.Actions.MoveProjectItemAction();
//move the file inside created folder
//somehow this doesent work
m.ProjectItems = folder.Collection;
m.ProjectItem = this.ProjectItem;
m.Execute();
}
Here MoveProjectItemAction is not behaving as i expected it to. the file that gets created by base.Execute actually dissapears when m.execute is called
Somebody from the GAT team will be able to tell us how do we move a fille or project item from one place to another