Exclude Files of a certain type in Visual Studio Pending Changes

PRS

I am using Visual Studio 2017 and becuase I am using Typescript I want to exclude .js and .js.map files from showing in TFS Pending Changes.

Looking at this https://msdn.microsoft.com/en-gb/library/ms245454(v=vs.110).aspx#tfignore it says to add a .tfignore file. So I have tried adding one to the root directory (where the .sln file is). The file contains the following text:

*.js
*.js.map

I have added this .tfignore file to source control as well and tried restarting Visual Studio, but the .js and .js.map files are still in Pending Changes.

Am I missing anything here, or is there a better way to do this?

PRS

Not a direct answer but I found a work-around for this.

I have webpack compiling and bundling the Typescript files as needed. However it was Visual Studio that was creating individual .js and .js.map files for each typescript file whenever I built the project. Since these weren't strictly needed I added the TypeScriptCompileBlocked element to the .Net Core project file as per How to disable TypeScript compilation in .Net Core projects?

This stopped it from creating the .js and .js.map files on build.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Visual Studio - How to search in pending changes files?

See Pending Changes in Visual Studio

How to exclude all but certain files in the sidebar in Visual Studio Code?

Visual Studio - how to ALWAYS show pending changes

Pending Changes Visual Studio 2013, Git repository

Visual Studio Code - Group pending changes by folder

Visual Studio 2013 Pending Changes does not include newly added item

Visual Studio Extension Development: How reference pending changes window

Visual Studio 2017 Prevent Ignore of Packages folder on pending changes TFVS

Include/Exclude files per visual studio configuration

configure git ignore file to exclude files of certain mime-type

tar - exclude certain files

exclude certain files in ls

Use double-click to see diffs for pending changes using VisualSVN in Visual Studio 2015

Visual Studio Code files.exclude setting not working

Visual Studio Code: Search Within Files but Exclude Folder

Visual Studio 2019: JS files not recognized as pending change while other files are

How can I get my changes back after clicking "Undo pending changes..." in Visual Studio 2013 and TFS

how to undo pending changes of files that are unchanged?

Visual Studio Code - type hints for JavaScript files

Visual Studio Go to All open files from bin and obj folder even I exclude them in Visual Studio

Can I restore discarded files from Visual studio git changes?

How to save changes in bulk edited files in Visual Studio Code?

Cropping Image with Graphics in Visual Studio changes file type headers

Is there a way/extension to exclude certain line(s) from "Format On Save" in Visual Studio Code?

exclude certain files from files found by ls

Exclude TypeScript-generated javascript files from Visual Studio 2015 search

Visual studio code notification asking if I want to exclude Java project settings files or not

Using Visual Studio's 'Find', is it possible to exclude specific files from the search?