Visual Studio 2015 new files not being added to source control automatically

后端 未结 4 1422
礼貌的吻别
礼貌的吻别 2020-12-13 18:52

I have just upgraded to VS2015 and I am experiencing an issue I have not seen before. Using an existing solution under source control, I am able to modify files and they get

相关标签:
4条回答
  • 2020-12-13 19:01

    We were also experiencing this issue but in our case it was because we had folders that ended in ".Lib". Figured it out from this SO question: Visual Studio 2015. Files not added to TFS

    0 讨论(0)
  • 2020-12-13 19:09

    Add a .tfignore file to the release folder containing the extensions you want it to not ignore:

    !*.vb
    

    I tried adding this to the .tfignore that existed in my solution folder and it didn't help. It only worked when I added one to the parent release folder.

    ..\Release
    ..\Release\.tfignore <-- this one
    ..\Release\SolutionA\
    ..\Release\SolutionA\.tfignore
    

    msdn thread on the subject

    0 讨论(0)
  • 2020-12-13 19:10

    Folders called Release and their contents is automatically excluded from TFS (along with Debug and lots of file types). You can override this for particular folders by creating a .tfignore file, as detailed in the "Customize which files are ignored by version control" section of this link

    Customize which files are ignored by version control

    By default certain types of files (for example, .dll files) are ignored by version control. As a result:

    When you add ignored files to folders that are mapped in a local workspace, they do not appear in the Pending Changes page in Team Explorer.

    When you try to add ignored files using the Add to Source Control dialog box (for example by dragging them into Source Control Explorer), they automatically appear in the Excluded items tab.

    You can configure which kinds of files are ignored by placing text file called .tfignore in the folder where you want rules to apply. The effects of the .tfignore file are recursive. However, you can create .tfignore files in sub-folders to override the effects of a .tfignore file in a parent folder.

    .tfignore file rules

    The following rules apply to a .tfignore file:

    # begins a comment line

    The * and ? wildcards are supported.

    A filespec is recursive unless prefixed by the \ character.

    ! negates a filespec (files that match the pattern are not ignored)

    .tfignore file example

    Ignore .cpp files in the ProjA sub-folder and all its subfolders
    ProjA*.cpp

    Ignore .txt files in this folder
    *.txt

    Ignore .xml files in this folder and all its sub-folders
    *.xml

    Ignore all files in the Temp sub-folder
    \Temp

    Do not ignore .dll files in this folder nor in any of its sub-folders
    !*.dll

    0 讨论(0)
  • 2020-12-13 19:27

    We have the same issue because of a branch called 'Release'. But the issue is only at Visual Studio 2015 Update 3. Using Visual Studio 2015 Update 2, everything is ok. So Visual Studio Update 3 must have been changed its behaviour. It would be useful to return to its old behaviour.

    0 讨论(0)
提交回复
热议问题