Buh Buh
Buh Buh

Reputation: 7546

How to configure TeamCity to perform clean build without deleting NuGet packages?

I am using TeamCity for my CI builds. To keep things simple suppose there are only two build steps:

  1. NuGet Installer -> Creates the packages folder and download from NuGet.org
  2. Visual Studio (sln) -> Build code

Before these run I would like the entire working directory to be reverted to match the SVN repo; deleting the bin/obj/anything else that might have snuck in. Only new changes in SVN should be downloaded, not the entire repo.

However, the packages folder should not be cleaned, because downloading these takes too long.

How could can I do this?

Some things I have tried:

Upvotes: 1

Views: 4645

Answers (1)

Mohammad Nadeem
Mohammad Nadeem

Reputation: 9392

If you don't check the box "Clean all files before build:" on the VCS settings page, VCS by default downloads only the updates from SVN. Now regrading bin/obj folders, you could add a step to clean the solution before any other step. Cleaning the solution will delete bin/obj contents.

Upvotes: 5

Related Questions