Where is filter in TFS 2012 defined? - visual-studio-2012

I have added a new nuget package to my solution.
In the "Team View -> Pending Changes -> Detected Changes" there are some of the files, but /lib folder is ignored. As a result CI build breaks.
Question: where is it specified in TFS (or Visual Studio?) to exclude /Lib folder (or files inside /Lib folder)?

Given you're using TFS2012 I assume you're using a local workspace. For local workspaces files are ignored using the .tfignore file. Check if you have that file present and if there is an exclusion for the /lib folder in it.
Also note that by default certain files are ignored, such as the .dll files that would be in the /lib folder of the nuget package. If a folder has no files to include it will not be shown in pending changes. You will have to add it manually via source control explorer.
Here's the reference for the .tfignore file if you want to see how it works.

You can quickly determine the location of your .tfignore file by choosing to ignore something in your detected changes. This will cause the .tfignore file to appear in your "Included Changes" with the new ignore setting (it will be created if it didn't already exist). From here you can double click the file to open it up for editing.

Related

Which settings are saved under the .idea folder and which are not?

I am confused about which settings are saved into the .idea project folder and which are not.
For example, if I add some File Watchers to the project, I know those are saved into the .idea folder. But if I enable/disable certain plugins, where is that setup saved? Into the project's .idea folder or into the whole IDE?
The goal is to keep more control of what is going on, because when working on the same project with multiple people I get confused with the .idea folder being constantly modified (and affecting my workflow).
JetBrains recommends to keep the .idea folder in the version control system, and I see some good points in that, but I want to be aware of which settings are saved under the .idea folder and which are not?

Shared ReSharper settings with out-of-source cmake builds

I am using cmake to generate my solution files and I'm doing that out-of-source. So I have a myproject folder and a myproject_build folder. When I save my ReSharper settings in team solution, it creates a dotsettings file in the myproject_build folder.
C:\
myproject
.hg
CMakeLists.txt
myproject_build
myproject.sln
myproject.DotSettings
How can I make sure that saving these settings goes into the source folder and be sure that all team members have the same settings?
I guess I would place a common dotsettings file into myproject, the file that you and your team will modify in the future. During generation of the solution into myproject_build you should generate a myproject.sln.dotsettings file as well, that need to hold a reference onto the file from myproject. You can include any other dotsettings file by going to ReSharper | Manage Settings and then right-click any layer (team-shared in your case) and add the particular file.

How do I rename a solution-level folder in TFS?

I'm using Visual Studio 2012 and TFS Express. I have the top level collection 192.168.100.100\Collection; under it I have a project for each program; under those I have the solution folders. So in the project folder FooBarBaz I have the solution OldName. (I'd rather not post screen shots of the folder tree, but I can rig up an ASCII art depiction if needed.)
I want to rename the folder OldName to NewName. I have already successfully renamed the solution itself and checked that in. I have also successfully changed my local mapping from ~/Projects/OldName to ~/Projects/NewName.
In MSVS Source Code Explorer, when I right-click on OldName the context menu options Rename and Move are both greyed out.
How do I rename the folder in TFS? I am the team's TFS admin so I can use the web-based settings and I can also use the TFS control panel on the host system.
Right click on the folder name in the left panel.
Also, you must have those folders mapped into your current workspace.
Pre-step assumption: Create local folder with solution and project under it and added solution to TFS. TFS now has a path in TFS pointing to a TFS folder that contains your added solution. This location is bound to the location on your local machine that is likely out of sync with the path structure represented in Source Control Explorer.
You want to rename the folder in TFS that holds your solution. When I right-click in Source Control Explorer, “Rename” is grayed out. It appears that TFS wants the TFS path to match your local path structure.
In order to rename the TFS folder I had to:
Check everything in
Remove binding to source control
Do a get latest - TFS assumes structure inherited binding - so whatever the folder is named and where it is in the TFS path structure, the get latest will create a local folder to hold the code.
Now, right click on the folder and do a rename in Source Control Explorer.
TFS and your local workspace are now in sync. If you now go and rename the TFS folder that contains your solution, the next time you open the solution, your local folder name will be automatically changed to match TFS.
Of course, don’t forget to go back later - after VS has released the lock, and delete your old/first/”no longer bound to TFS” version of the local solution folder.
I hope this helps someone else.

Unable to ignore files in Visual Studio 2012 using .tfignore file

I'm having some problems ignoring files in VS 2012 and was wondering if anyone could help. Essentially what I'm trying to do is ignore the Web.config file from a project in a solution.
I'm aware of the ability to "Exclude" the file but I wanted something a little more robust as I really don't like the way that VS re-includes the files when I right click the solution file and click "Check In".
Here's what I've tried so far:
Made a change to the Web.config
Team Explorer tab->Excluded Changes->click "Detected" link
Right click a file->"Ignore this local item" to create .tfignore file*
Open the .tfignore file and append "*.config". Saved.
Reopened VS
Opened Team Explorer tab again->Pending Changes
Web.config still appears in the "Included Changes" list!
As explained on http://msdn.microsoft.com/en-us/library/ms245454(v=vs.110).aspx#tfignore
Visual Studio seems to just completely ignore my .tfignore file.
Does anyone have any ideas/workarounds? Cheers.
You'll have to make sure you are using a local workspace (can be configured in the advanced part of edit workspace). The .tfignore file should apply as long as it is in your workspace. It will apply recursively to any subfolders and can be overridden by another .tfignore in any of the subfolders. Here's the reference for the .tfignore :
http://msdn.microsoft.com/library/vstudio/ms245454%28v=vs.110%29.aspx#tfignore

Using local TFS workspace for non-VisualStudio source code

I am trying to use TFS storing non-VisualStudio source code. Working with Visual Studio 2012 and Microsoft's online Team Foundation Service.
I've setup a TeamProject and mapped its root to a local folder. All it contains at the moment is a BuildProcessTemplates folder in it. (which was created as part of the TeamProject)
I copied my source code externally (using windows explorer) into the TeamProject root folder on my hard drive and since my TFS workspace is NOT a server workspace but rather a local workspace, I was expecting VS to detect the folders/files and show them in Pending Changes window .... yet it doesn't.
Interestingly, new files in the root folder are detected as "Excluded Changes" but new folders are not detected.
What am I missing?
First make sure the newly added folders contains files.
Are there any Detected changes shown in the Excluded Changes section?
Pending Changes > Detected changes link > The Promote Candidate Changes dialog box appears > check the files you want and click Promote.
I can't say I have ever noticed nor expected TFS to automatically pick up files or folders added to a mapped directory as pending changes.
I always just add them manually using the 'Add existing items' option from the source control view.
It may actually do (or at least be meant to do) the auto-detection, but I can't say I've ever relied on it. I don't think it's something to fret too much about - adding them manually is easy enough, and the 'Add existing items' option is usually smart enough to show you which files are not already under source control, so even if you need to add even more files later, it shouldn't be too much extra effort.

Resources