Flavored Project: How to always add a custom project item to a certain folderHello, <div>  In my flavored I have folders for each of my custom project items that I have created and when one of my custom project items are added to the project I want to them always be added to the correct folder. What is the best way to go about doing this? For example I have a item named &quot;MyItem&quot; so it should be added to the &quot;MyItems&quot; folder even if the user right clicks on the project node and adds the item from there.</div> <div><br/></div> <div>Thanks</div> <div>Kenny</div>© 2009 Microsoft Corporation. All rights reserved.Wed, 08 Jul 2009 03:22:17 Zfd923ddf-da94-4bcd-9b8c-5e96d25c97a2http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/fd923ddf-da94-4bcd-9b8c-5e96d25c97a2#fd923ddf-da94-4bcd-9b8c-5e96d25c97a2http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/fd923ddf-da94-4bcd-9b8c-5e96d25c97a2#fd923ddf-da94-4bcd-9b8c-5e96d25c97a2Kenny Chinnhttp://social.msdn.microsoft.com/Profile/en-US/?user=Kenny%20ChinnFlavored Project: How to always add a custom project item to a certain folderHello, <div>  In my flavored I have folders for each of my custom project items that I have created and when one of my custom project items are added to the project I want to them always be added to the correct folder. What is the best way to go about doing this? For example I have a item named &quot;MyItem&quot; so it should be added to the &quot;MyItems&quot; folder even if the user right clicks on the project node and adds the item from there.</div> <div><br/></div> <div>Thanks</div> <div>Kenny</div>Wed, 01 Jul 2009 20:42:55 Z2009-07-01T20:42:55Zhttp://social.msdn.microsoft.com/Forums/en-US/vsx/thread/fd923ddf-da94-4bcd-9b8c-5e96d25c97a2#59f48b43-d532-42d2-9c10-f9637c5576fehttp://social.msdn.microsoft.com/Forums/en-US/vsx/thread/fd923ddf-da94-4bcd-9b8c-5e96d25c97a2#59f48b43-d532-42d2-9c10-f9637c5576feRusty Descheneshttp://social.msdn.microsoft.com/Profile/en-US/?user=Rusty%20DeschenesFlavored Project: How to always add a custom project item to a certain folderHi Kenny,<br/><br/>One option would be to listen to item added (and potentially rename) events and when those happen do your filtering and if the item needs to be somewhere else leverage the cut and paste commands to move it to the folder where you want it to be.<br/><br/>An alternative would be to overwrite all the code path that can cause items to be added (and this assume the the project you are flavoring doesn't ever add anything through internal method which you can't overwrite) and do the filtering at that point. A good starting point for that would be to control the automation objects.<br/><br/>RustyWed, 01 Jul 2009 22:24:45 Z2009-07-01T22:24:45Z