8

Visual Studio 2017 (v15.9.9).

I can't seem to figure out how to create a .tfignore file. If I do it manually, windows tells me I need to add a file name. And I am not seeing anywhere via the IDE to create one.

I'm used to GIT, where I can right click on a pending check-in file (that has changed) and just select "Ignore". But I don't seem to have that option, despite the fact that all the results I find via Google tell me that I should.

3
  • Technically not a dupe I guess since it's for a .gitignore, but should still work: stackoverflow.com/questions/10744305/… Commented Mar 18, 2019 at 18:52
  • @BrootsWaymb, can you make that an answer? :) Commented Mar 18, 2019 at 18:55
  • If you have a local workspace, you can add a new file and in the bottom of the pending changes window you have the changes you can 'promote'. In that window, you can right click the files to automatically add them to a .tfignore file that will be created for you. Commented Mar 18, 2019 at 19:00

3 Answers 3

5

You can create your file as .tfignore.. The last dot will be removed automatically.

Sign up to request clarification or add additional context in comments.

1 Comment

This is the easiest way to implement. Very hepful :)
5

the easiest way is to open command prompt and navigate to your project folder. Then

notepad .tfignore

after that just save file and you are good to go.

Or you can also use

echo "" > .tfignore

Note that you may need to manually include this file to TFS

Comments

4

This can be solved using the same steps as How to create .gitignore file (just replace .gitignore with .tfignore):

Create the text file tfignore.txt Open it in a text editor and add your rules, then save and close Hold SHIFT, right click the folder you're in, then select Open command window here Then rename the file in the command line, with ren tfignore.txt .tfignore

However, an easier/quicker way to get around this Windows Explorer error is by appending a dot to the filename without extension: .tfignore. will be automatically changed to .tfignore

2 Comments

I edited your answer because .tfsignore is not the correct file name -- it is .tfignore. Note the lack of an "S".
Thanks @DanielMann. I'm only familiar with the .gitignore equivalent, so was just going off of the info in OP's post.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.