nuget - Get TFS to ignore my packages folder -


I was trying to get TFS (2013) to ignore my package folder I am I do not want to completely control the source because I am using Nugget and this is great!

I have tried cloaking (does not seem to work), I have tried to add . Tfignore files - nothing is ignored Why do not the TFS team add an option to just ignore a folder or file like subversion clients do ?!

This is the deal: let us exchange packages for NuGet and TFS To ignore, the NuGet source-control is trying to do related content, which should not be done at all (bad form, Microsoft!) Then you have to do two things.

First of all, add a file named .tfignore in the Solutions folder ( s after the deficiency of tf Please). This content should be as follows:

  \ packages  

This tells TFS to ignore your package folder. Now, you will think that it will also ignore the repositories.config file. But this will not happen. Why? Who knows, Microsoft's methods are weird and mysterious. In fact, I think this newsletter is part of the stuff, which I have been given below, but if it becomes certain in the future and you give it a VS rebirth instead of < Code> repositories.config file, you are able to use it:

  \ packages! \ Packages \ repositories.config  

OK, now thanks to our .tigignore file, TFS is ignoring your packages. Everything is fine, is not it? False , because NuGet is roaming with your source control and adding packages to your pending changes, we now tell NuGet to cut it already.

Create a folder named .nuget in the root of your Solutions folder. 1 Now, create a file named NuGet.config , and put it in this new folder 2 . Its content should look like this:

  & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Configuration & gt; & Lt; Solution & gt; & Lt; Add key = "disableSourceControlIntegration" value = "true" /> & Lt; / Solution & gt; & Lt; / Configuration & gt;  

and now should be out of control of your package source. Remember to add NuGet.config and .tfignore files to the source control, so they will never lose.

Edit: If you have a problem, you want to delete your package folder, check that change, and then go to the steps above. Are there.

Also edit: It does not seem to be that with new versions of Nuget, so if you switch to VS / TFS 2017, then this problem is not possible without hoops The jump will be clean without

1 Add a folder using the Source Control Explorer; Solution-> Add Folder ->. Right-click on the Nuget
2 . When I got it VS 2013, I found that NuGet.config had to go to the .nuget folder. Even if you already have a NuGet.config file in the root of your solution folder (because, say, your company has an internal private feed). However, some of the comments have indicated that this VS The 2015 solution works fine in the Route. Personally, I switched to use TFS in GIT mode, so I can not test. Additionally, if you have a custom feed, make sure that you have both the custom feed and nuget.org as the key in the Nuget.config file, or sometimes TFS will randomly decide that this package Can not restore.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -