Ask a questionAsk a question
 

AnswerExcluding files from source control

  • Tuesday, October 27, 2009 9:32 PMeric.goforth Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hello,

    In "Source Control File Types" on my tfs server, I have "file merging" disabled for Image Files, but that I still get hundreds of dynamically created image files that my asp.net website uses showing up in my Pending Changes list in tfs. 

    Is there anyway I can tell tfs to not try to do source control on a particular file type?

    -Eric

Answers

  • Thursday, October 29, 2009 5:35 AMRuiz YiModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi Eric,

    Because WebSite considers all files in the website folder belong to it,  Source Control will include the auto-generated images. You can use WebApplication instead of WebSite , which is suggested in Version Control.

    Another way is to Cloak the Images folder.
    Check in the image folder and then cloak it in source control explorer. Source Control will delete the local folder but you can add it(with the same name) later.
     Now any files in this folder will not appear in Pending Change again. But do not expand the folder in solution explorer because souce control will try to add all files in WebSite .

    Best Regards,
    Ruiz
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Sincerely, Ruiz Yi

All Replies

  • Wednesday, October 28, 2009 4:51 AMEwald Hofman - Avanade Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Yes you can.

    See http://www.ewaldhofman.nl/post/2009/08/02/Change-the-file-masks-that-are-excluded-by-Source-Control.aspx
    Ewald - Please remember to mark the replies as answers if they help.

    Ewald Hofman
    Blog: www.ewaldhofman.nl
  • Wednesday, October 28, 2009 3:16 PMeric.goforth Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Ewald,

    I'm having problems implementing this.

    I added .png to this registry entry but I'm seeing png files still in my list of pending checkins.

    I've tried refreshing the list and I've tried restarting Visual Studio.

    My registry looks like now:

    Windows Registry Editor Version 5.00

    [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\TeamFoundation]

    [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\TeamFoundation\OfficeIntegration]

    [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\TeamFoundation\OfficeIntegration\Excel]
    "tbTop"=dword:fffffff8
    "tbLeft"=dword:fffffff8
    "tbWidth"=dword:000000c8
    "tbHeight"=dword:0000001a
    "tbVisible"=dword:00000001
    "tbRowIndex"=dword:00000006
    "tbPosition"=dword:00000001

    [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\TeamFoundation\Power Tools]
    "DefaultTemplateStore"="C:\\Users\\eric.goforth\\Documents\\Work Item Templates"
    "TeamTrackerEnabled"="True"
    "TeamTrackerContactSyncEnabled"="True"
    "TemplateEnabled"="True"
    "WindowsExplorerEnabled"="True"
    "WildcardStatusSearchEnabled"="True"
    "QuickLabelEnabled"="True"

    [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\TeamFoundation\Servers]
    "ral-dev-tfs-01"="http://ral-dev-tfs-01:8080"

    [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\TeamFoundation\Servers\ral-dev-tfs-01]
    "AutoReconnect"=dword:00000001
    "Offline"=dword:00000000

    [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\TeamFoundation\SourceControl]
    "GetLatestOnCheckOut"="False"
    "ShowDeletedItems"="True"
    "FilterPendingChangesBySolution"="True"

    [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\TeamFoundation\SourceControl\AddOptions]
    "ExcludeMasks"="Debug;Release;*.pdb;*.obj;*.dll;*.exe;*.res;*.resources;*.cache;*.ilk;*.ncb;*.lce;*.png "

    [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\TeamFoundation\SourceControl\DiffTools]

    [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\TeamFoundation\SourceControl\DiffTools\.*]

    [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\TeamFoundation\SourceControl\DiffTools\.*\Compare]
    "Command"="C:\\Program Files\\Beyond Compare 2\\BC2.exe"
    "Arguments"="%1 %2"

    [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\TeamFoundation\SourceControl\Explorer]

    [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\TeamFoundation\SourceControl\Explorer\167425d8-6899-4ca1-967d-589a3fe1add9]
    "LastWorkspace"="SCRATCH2"

    [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\TeamFoundation\SourceControl\FolderDifference]

    [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\TeamFoundation\SourceControl\FolderDifference\Filters]

    [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\TeamFoundation\SourceControl\FolderDifference\ViewOptions]
    "ShowTargetOnlyItems"="False"

    [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\TeamFoundation\SourceControl\PendingCheckins]

    [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\TeamFoundation\SourceControl\PendingCheckins\167425d8-6899-4ca1-967d-589a3fe1add9]
    "LastWorkspace"="SCRATCH2"

    [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\TeamFoundation\SourceControl\Proxy]
    "Enabled"="False"
    "Url"=""

  • Thursday, October 29, 2009 5:35 AMRuiz YiModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi Eric,

    Because WebSite considers all files in the website folder belong to it,  Source Control will include the auto-generated images. You can use WebApplication instead of WebSite , which is suggested in Version Control.

    Another way is to Cloak the Images folder.
    Check in the image folder and then cloak it in source control explorer. Source Control will delete the local folder but you can add it(with the same name) later.
     Now any files in this folder will not appear in Pending Change again. But do not expand the folder in solution explorer because souce control will try to add all files in WebSite .

    Best Regards,
    Ruiz
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Sincerely, Ruiz Yi