I have a project on visualstudio.com and I am connecting to it from VisualStudio 2013, In the team explorer, how to ignore .dll files from checkin?
I was doing the same in svn like this How do I ignore files in Subversion?
If you're using Team Foundation Version Control, you can create .tfignore files in folders in your workspace to ignore any files that VS is not ignoring by default.
If you're using Git version control, you can create a .gitignore file. You can get a .gitignore for your project type here, or go into Settings in Visual Studio Team Explorer to add one automatically.
You can check-in/commit tfignore and gitignore files into source control so that the specified files are ignored for everyone. Any files that were already added to the repository will not be affected, however; those have to be removed manually.
Related
Team Foundation Server 2018 / Visual Studio Professional 2017 - Version 15.9.5
When i manually create a new file in Windows Explorer in a certain directory that is part of the TFVC source controlled tree, that file gets automatically added to TFVC pending changes (as "add"). Note that the file is not part of any project.
(The solution was opened in Visual Studio at the time the file was created).
This does not happen in other directories. I can add files to windows directories and they will NOT automatically be added to TFS and need to be manually added to TFS within VS Source Explorer. This is the expected behavior for me.
So it seems it is some configuration of a specific folder?, but i can't find it.
Didn't even know this was possible.
Can you tell me where to look?
FYI, this is a local workspace.
Edit: I have the TFS Explorer extension installed.
Edit: The new file is only added to pending changes when VS is open when creating the file in the folder. I did a test with VS closed, then create new file. Then reopen VS with solution and the file does NOT appear as a pending add.
When your workspace is configured as a Local workspace, files and folders are automatically detected and added (unless excluded by a .tfignore file).
Generally Local Workspaces are way more convenient, and are the default for workspaces with fewer than 100000 files (and with a fast system can exceed that number). It can be beneficial to configure a good tfIgnore file to control what is added automatically and what is ignored.
When there are no explicitly Included changes in your Team Explorer and you're in a local workspace, Visual Studio(2017+ from the to of my head) assumes you want to add all new changes and will auto-include them.
When your workspace is configured as a Server workspace, files and folders need to be manually added/removed, unless the changer are made through an IDE that is aware of the repository (Visual Studio will auto-add changes made in the solution explorer).
You can check the type of your workspace from the commandline:
tf workspaces /format:detailed /collection:https://dev.azure.com/jessehouwing
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise>tf workspaces /format:detailed /collection:https://dev.azure.com/jessehouwing
=======================================================================================================================
Workspace : JACKIE
Owner : Jesse Houwing
Computer : JACKIE
Comment :
Collection : https://dev.azure.com/jessehouwing
Permissions: Private
Location : Local
File Time : Current
Working folders:
Or from Visual Studio:
I'm working with TFS on visual studio 2017. I had to reinstall it and now it automatically add all files in folder to source control.
By example, if I compare a file.cs with repository with winmerge, winmerge create a file.cs.bak in my folder. TFS will see the file in folder and add it to source control when I check in.
How can I disable this feature ? Before the reinstall, only files created with visual studio was added to source control.
Yes,as Shayki said in his comment, you should use .tfignore which will help to ignore whatever files you don't want to checkin to the source control.
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.
######################################
# Ignore .cs.bak files
*.cs.bak
I'm using Visual Studio 2015 update 3 with TFS hosted at visualstudio.com.
When I add a C# class file to one of my projects in Visual Studio, it's not automatically added to source control. For other projects in the same solution, C# class files are added automatically, as expected.
When I then add the file, manually, in the project with this problem, I get the following question;
I have to confirm to add the file to source control.
There is a similar question (Visual Studio 2015 new files not being added to source control automatically), associated with a "release" branch, which is not the case here (at least I think so - our TFS-project has never been branched)
We've never configured any .tfignore manually.
This started to happen recently and occurs on all development machines, so it's probably not a client machine issue.
I'm clueless, so any help is highly appreciated.
UPDATE
I've discovered that the problem occurs in projects with names ending with ".Lib"
Projects:
Core (ok)
Core.Lib (files not added automatically)
Communication (Ok)
Communication.Lib (files not added automatically)
I tried to add a test project Test.Lib to my solution. This project was not added to TFS either, but project Test was.
The "lib" extension is the problem. Try renaming the project folder to something else, eg. "CoreLib".
To reproduce this behavior / bug, try the following:
Create a Test directory in a directory controlled by TFS
Create a Test.Lib subdirectory in this directory.
Add a file, test.cs, to Test.Lib. (Test\Test.Lib\test.cs)
In Visual Studio's Source Control Explorer, try adding the new Test directory to source control. You'll see test.cs on the "Excluded items" tab.
The "lib" extension is used by binary files, and these are ignored by Team Explorer by default. I haven't found an official list of filetypes anywhere, but other affected file types are dll, exe, obj and possibly others. You can include these files manually by right-clicking them and selecting "Include".
I'd like to clear my (as I call it) not checked-in items history of source control in visual studio.
These items are there because in a project I did include the project via adding the actual windows folder to the team foundation server; and there are bin files and resharper files that are never going to be checked-in.
Everytime I have to check-in something, I need to scroll all the way down to my clearly added project files; and that's annoying.
Thanks in advance.
These files should never have been added to source control. Your best bet is to delete from the TFS.
You should only check-in files that need "version control"; Resharper files, bin\ & obj\ folders, *.suo, *.user files, etc. should be removed from TFS.
When adding new files to TFS, it has a filter no to add these to source control. See here on MSDN for more details.
I am using AnkhSVN in Visual Studio.
How can I delete all files from SVN as I delete them from Visual Studio (files ARE NOT included in projects).
Ideally I would like to do:
Press "Show All Files" In Visual Studio (shows the files not included in projects).
Delete selected files (the ones not included in projects) from VS Solution Explorer.
Commit (Deletes the files in SVN)
But this is not possible and I have to delete files directly from Repository OR delete missing files from TortoiseSVN.
Cheers,
Dmitriy.
Your scenario should work. What's wrong with deleting missing files using TortoiseSVN?
TortoisSVN commit http://img21.imageshack.us/img21/5603/tortoisesvncommit.png
The easiest way to do it is using explorer. You can add a column to explorer called SVN Status. You can then sort the file view using that and delete the ones that you don't want..
(source: tigris.org)
I do not think AnkhSVN checks for files that are not in your project. Why don't you directly delete them in explorer using TortoiseSVN?
I either use a RapidSVN for that task, or add to VS Project (Add - Existing file) then delete, as Daniel says.