6

I have my main project set up very simply in TFS. I've recently begun making a few of my project components generic enough that I can sell them to other organizations using the software for which I made my custom components.

I want to pull these components out into their own branch so I can make minor tweaks and so that I can easily just zip up the relevant files and send them to people who purchase them, but I don't want to have all the surrounding files in that branch.

My project is at $/Project/Main/. The files I need to merge into their own branch are spread out.

$/Project/Main/web/less/modules/myCustomModule.less
$/Project/Main/web/css/myCustomModule.css
$/Project/Main/web/scripts/myCustomModule.js
$/Project/Main/web/UserControls/custom/myCustomModule.ascx
$/Project/Main/web/UserControls/custom/myCustomModule.ascx.cs

I need to copy the directory structure after .../web/ into $/Project/NinjaModules/ but I only want those five files.

tf merge $/Project/Main/web/less/modules/myCustomModule.less $/Project/NinjaModules/less/modules/myCustomModule.less
...

This works fine until I want to merge my changes from $/Project/Main to $/Project/NinjaModules, since I then have to re-run all my commands individually.

Is there a correct way to structure this?

Note: I could tf merge all the directories under $/Project/Main and then tf delete all the files I don't want, but that seems like a rather heavy method to handle it, and any time I add a new file to $/Project/Main and then do my merge, I'd have to delete the new files in $/Project/NinjaModules.

2
  • 3
    I would suggest you create separate TFS projects for those components and then use NuGet (and a local shared drive/internal IIS server as a local NuGet package source).
    – David Arno
    Jan 21, 2016 at 21:12
  • Do not create multiple Team Projects in TFS/VSTS to manage this. That will result in fragmentation and workflow issues. Feb 15, 2016 at 14:24

1 Answer 1

2

This is much Easier in Git than TFVC but you can and should do everything in one team project. Use area path and folders for each of your components and create Nuger packages for each. You can then consume and auto update those components across your implementation:

http://nkdagility.com/one-team-project/

2
  • The online version of TFS has enabled cross project work item queries. It doesn't totally alleviate the pain of having multiple projects, but it helps.
    – RubberDuck
    May 15, 2016 at 19:56
  • You have always been able to do that. Still does not work in Excel. May 17, 2016 at 9:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.