Fetchez la vache
Fetchez la vache

Reputation: 5230

Builds work on build machine through TFS/Team Build but not TeamCity

I'm new to TeamCity so please be gentle

I've set up teamcity on the build server. .net builds work when initiated through Visual Studio Team Builds, but not when started through Teamcity (via clicking on the run button in administration, plus on check-in).

The builds are failing with loads of similar reference errors, such as.. User Controls\ucCalendar.cs

(19, 11): error CS0246: The type or namespace name 'AxMSACAL' could not be found (are you missing a using directive or an assembly reference?)
followed by our own objects which have not been created due to other errors.
DAL\OrderItemCollection.cs

(31, 16): error CS0246: The type or namespace name 'OrderItem' could not be found (are you missing a using directive or an assembly reference?)

I understand what these errors mean, but I obviously am missing something fundamental, as I do not understand why it is working when built on the build machine via TFS/Team Build but failing on teamcity when..

What is TeamCity doing differently to TFS/TB that is causing these errors?

Any pointers would be very helpful. Cheers

Upvotes: 2

Views: 1108

Answers (2)

David Strahm
David Strahm

Reputation: 273

Things you can try:

  1. Make sure your TFS VCS Settings are correct, you need to attach your TFS VCS root and then add Checkout rules with this syntax:

    +:path/to/ProjectFolder=>.
    +:path/to/libary=>library/path
    

    This will check out the contents of your Project folder to the agent.work.dir/buildNumber and your library to agent.work.dir/buildNumber/library/path.

  2. Open Visual Studio and check the references to your libraries, then go to the buildmachine and open /buildNumber (you will find the path in TeamCity->Agents->(TeamCityAgent)->Agent Parameters. Look for your Libraries and see where TeamCity has checked them out to.

  3. It might also help to open the checked out solution on the buildmachine (agent.work.dir)/buildNumber, providing VS is installed. You should see where your references are off

Upvotes: 3

AlG
AlG

Reputation: 15157

Usually, this is TeamCity not being able to find something that exists on the build server/developers system but doesn't exist when TeamCity recreates the build environment "cleanly". It's exactly what brought us to using it, to catch these types of "it builds on my system!" errors.

Does the AxMSACAL project get built in the right order by TeamCity? If it's a 3rd party component is it being pulled down by TeamCity?

Upvotes: 0

Related Questions