locked
How to establish project item DependentUpon other item? RRS feed

  • Question

  • hello all,

    is there anyone can give a hand to tell me How to establish project item DependentUpon another item?like "form.cs" to "form.designer.cs" and so on.

    thanks a lot.

    Monday, January 23, 2006 1:45 AM

Answers

  • The item nodes in your hierarchy will need to support having child node. You will also want to make sure your automation object for your items (ProjectItem) support enumerating and adding item to their ProjectItems collection.

    And of course, you need to make sure you persiste the information as to which items depends upon which other and be able to recreate your hierarchy based on that when it gets loaded.

    Rusty

    Wednesday, January 25, 2006 5:57 PM

All replies

  • Hi Matt,

    Which project system are you using? VB? C#? Your own? In the later case is it based on any of our samples (which one)?

    This should help us provide your the correct answer.

    Rusty

    Monday, January 23, 2006 5:58 PM
  • Hi Rusty,

    i will create my custom project type whick generate business framework and items,

    it dose not base on any of your samples, be about to understand the VS SDK framework exactly,i create project anything manually except for wizard doing for me.

     thank you for your help.

    Tuesday, January 24, 2006 12:48 AM
  • The item nodes in your hierarchy will need to support having child node. You will also want to make sure your automation object for your items (ProjectItem) support enumerating and adding item to their ProjectItems collection.

    And of course, you need to make sure you persiste the information as to which items depends upon which other and be able to recreate your hierarchy based on that when it gets loaded.

    Rusty

    Wednesday, January 25, 2006 5:57 PM
  • thank you for help.

    but could you post some sample code?

    Friday, February 10, 2006 3:22 AM
  • you can download free addin to visual studio from here: http://www.kooriyoo.com/VSCommands/Default.aspx

    and group items from VS IDE without need to add DependentUpon manually to project file.

    Thursday, March 27, 2008 11:36 AM
  • Monday, March 30, 2009 10:04 AM
  • I did it by modifying the vstemplate,
    <ProjectItem SubType="Code" TargetFileName="$fileinputname$.cs" ReplaceParameters="true">Test.cs</ProjectItem>
        <ProjectItem SubType="Code" TargetFileName="$fileinputname$.cs\$fileinputname$Dependent.cs" ReplaceParameters="true">TestDependent.cs</ProjectItem>
        
    • Proposed as answer by Ron Jacobs Wednesday, June 30, 2010 12:04 AM
    Thursday, June 11, 2009 10:51 PM