Posts

Showing posts with the label Developer Tips

NuGet Like a Boss: Part 1 - Don't Check in Packages

Image
After suffering like many with so many Package Restore woes in my projects I decided to make notes on the best way to deal with Nuget packages. Ignore the packages folder Not doing this means you check in the packages which are huge. This is annoying and kind of defeats the purpose of Nuget. When you ignore (and therefore don't check in) your packages folder, anyone getting your source code can run package restore on the solution and Nuget will download the packages automatically. How? First, add a file named .tfignore . This may require some Command prompt renaming as some set ups don't like files beginning with a dot. When you get past this annoyance, open the file in notepad and enter the following: \packages That tells TFS to ignore the packages folder. For some bizarre reason, this doesn't include the respositories.config file. You'll need to add a second line as follows: !\packages\repositories.config You'd think this would be it, but you may