Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What happened to "Exclude from Source Control" in VS2012

I want to exclude some of the files in code folders from TFS 2012 source control.

Before VS2012 this was done by the "Exclude from source control" command available in "Source Control Explorer"s right-click menu. But in VS2012 I can not find it.

Does anybody know where it is ?

(I am using a "Local" workspace by the way.)

like image 293
e-mre Avatar asked Dec 07 '12 14:12

e-mre


People also ask

What is exclude from Project in Visual Studio?

This means that the compiler will not process it. We can right click on the file, choose properties, go to General and click on Excluded From Build, then choose Yes or No to exclude or re-include.

How do I exclude files in Visual Studio?

You can use the exclude folder option to remove unwanted folders like node_modules or others you don't want to open in Visual Studio Code. To exclude a folder, go to File > Preferences, and search for file. exclude in the search settings. You can add the pattern of the folder you don't want Visual Studio Code to open.


1 Answers

When you click on "Detected Changes" in the Team Explorer pane, "Promote Candidate Changes" window opens. This window allows you to select among detected changes and promote them to a source controlled item.

In this "Promote Candidate Changes" window, you select a file (or multi select files with Shift), right-click on it and a context menu pops up which contains an "ignore this local item" option. If you you click on it, selected files are excluded from source control.

Visual Studio adds a file named ".tfignore" to the source control mapping root, which contains names of all files to be ignored by source control. (Previous TFS versions did not produce this file but they were all server workspaces. Since this is a "Local" workspace, filenames to be ignores need to be kept in the workspace)

like image 92
e-mre Avatar answered Sep 20 '22 17:09

e-mre