tfignore not working in VS 2013

心已入冬 提交于 2019-12-06 19:35:10

问题


I'm using Visual studio 2013 with TFS 2013. I've been trying to get all files in a folder to not checkin using .tfignore and with hours of searching and trying different solutions with no luck. I followed the instructions http://msdn.microsoft.com/en-us/library/vstudio/ms245454.aspx and could not get it to work. Any help is appreciated.

My project structure looks something along the lines of:

  • project
    • Controls
    • TestIgnore
      • Class1.cs
      • Class2.cs
    • .tfignore

and my .tfignore has 1 line of code: \TestIgnore

My workspace is set to local.

When I make changes to Class1.cs, when I check in, Class1.cs is in the pending check in list which I believe it should not.


回答1:


I was very frustrated with this, and nothing seemed to work despite having the .tfignore file in the same folder as the solution, and deleting the packages folder (which I'm trying to get TFS to ignore) After building, nuget would restore the packages and the packages would show up in the pending changes window.

But on a whim, and remembering some vague comment I saw somewhere, I right-clicked on the solution in the solution explorer, and chose "Enable Nuget package restore" - which adds a .nuget folder to the solution, and lo and behold, suddenly the packages folder WAS ignored when checking in the solution to TFS.

I exited VS2013, deleted the packages folder, opened the solution again, selected "Rebuild solution" and the packages were restored, but nothing shows in the pending changes window. Success at last!

Upon further investigation, it appears it's the nuget.config file and the setting "disableSourceControlIntegration=true" which is necessary as seen in http://nuget.codeplex.com/workitem/4072




回答2:


I asked the same question on msdn and got a reply saying it seems to be a bug in VS 2013 for not supporting tfignore. I submitted a bug on msdn as well and well close this question. Hopefully it will get fixed soon.




回答3:


tfIgnore does not work for me in Visual Studio 2013

Edward Wilde's answer fixed it for me. I had to delete the already checked in packages on the source control itself. Then tfs would ignore the changes.




回答4:


I had a similar issue where TFS was preventing me to checking a .tfignore file placed 2 folders down from the Project root.

I got it to work ONLY when the .tfignore file was placed on the project's root folder. (.tfignore file placed side by side to "Main" folder).

In this way, TFS let me checkin my .tfignore file.



来源:https://stackoverflow.com/questions/25207577/tfignore-not-working-in-vs-2013

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!