locked
Is there a way to create a versioned item which consists of a list of other versioned items (a list of references to other items - a software Bill of Materials)? RRS feed

  • Question

  • In the Source Control Explorer I can create folders and add items to those folders.  This works very well.

    Now I wish I could create a new folder and put in that folder references to items that are in other folders.
    I don't want to add a copy of the same item or branch.  I really just want a list of arbitrary items that are in other folders.
    Is there any way to do something like this?

    A partial method is to use a Work Item.  In the Work Item I can add links to arbitrary versioned items.
    This does allow me to effectively make a list of items, but the Work Item is not itself a versioned item, so it doesn't maintain versions.

     

    Thursday, February 24, 2011 6:13 PM

Answers

  • Hi,

    This isn't a perfect solution, but you could accomplish this by storing these configuration files in a Visual Studio project.  I created a simple class library project. Then I created a solution folder with the list of configuration files.  In the class library project, I created a number of folders and created a link to configuration files.  This could be versioned by checking in/labeling the code.  You could either using the check in comments for the "why and how" it changed.  Or you could create a work item and associate the work item to the check in.

    To create a link/shortcut in a project:

    1. Right click on the solution and do New > Solution Folder
    2. Create/add the actual files in the solution folder
    3. Create the various folders in the class library project.
    4. Create the link by Add > Existing Item, Select the file, and change the Add button drop down to Add As Link.

    I hope this helps,

    Mike


    blog - http://www.codesmartnothard.com
    Wednesday, March 2, 2011 2:41 AM

All replies

  • Hello DonA_ADC,

    Based on your description it seems that you want to create a versioned item which consists of other versioned items, just like a work item links other items. However, as far as I know it is not possible. There are no such features in the Source Explorer.

    I am curious why do you want to have such a versioned item?

    Thanks,


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, February 25, 2011 5:28 AM
    Moderator
  • I manage software which is used on automated equipment.
    TFS is maintaining the source for applications that we develop for that equipment.
    But the equipment also uses lots of other software in various
    electronic devices (non-computer devices).  Modern equipment
    has "software all over the place".  I need a system to manage the
    configuration of the software in various machines.  I want the ability
    to define what it associated with each machine and track that collection
    of items as a versioned collection.  When that configuration changes,
    I want a Work Item that documents why and how it changed.

    I concede that what I want is not a natural fit with the typical target use of TFS.
    But if such a feature was available, I believe others would find interesting uses for it and it could extend TFS to serve a wider customer base.
    If you know of another application that would help with this situation, please suggest it.

    Friday, February 25, 2011 1:29 PM
  • Hi,

    This isn't a perfect solution, but you could accomplish this by storing these configuration files in a Visual Studio project.  I created a simple class library project. Then I created a solution folder with the list of configuration files.  In the class library project, I created a number of folders and created a link to configuration files.  This could be versioned by checking in/labeling the code.  You could either using the check in comments for the "why and how" it changed.  Or you could create a work item and associate the work item to the check in.

    To create a link/shortcut in a project:

    1. Right click on the solution and do New > Solution Folder
    2. Create/add the actual files in the solution folder
    3. Create the various folders in the class library project.
    4. Create the link by Add > Existing Item, Select the file, and change the Add button drop down to Add As Link.

    I hope this helps,

    Mike


    blog - http://www.codesmartnothard.com
    Wednesday, March 2, 2011 2:41 AM
  • This is very helpful!
    I can also create a blank solution and "add existing items" to the solution.
    When I add items to the solution (or class library project), I get a dialog box to select files with an Add button.
    I don't see the option/drop-down to change that to a "Add As Link" (with VS2010).
    However, it does seem to work; it adds the files to the solution as links.

    The solution appears to end up linked to the "always latest version" of the linked items. 
    If I revise a linked item then the solution appears to automatically refer to the revised item.
    Is there any way to control that (i.e., an option to pull the version that was originally linked to the solution)?
    I could add a label to all the linked items, but it's not easy when the items are all over the place.
    I could also do it by date; I can look at the history of the solution to see when it was checked in and fetch versions of the items by that date.
    Does anyone know a better way?

    Wednesday, March 2, 2011 4:41 PM
  • Hello DonA-ADC,

    I have marked Mike's reply as answer. If you found it no help, please feel free to unmark it and let me know.

    Thanks,


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, March 7, 2011 10:53 AM
    Moderator