views:

127

answers:

2

I'm completely new to TeamCity and I'm using a simple Visual Studio 2008 solution to learn it.

My solution has 2 projects: ConsoleApplication1 and ClassLibrary1.

ConsoleApplication1 has a reference to ClassLibrary1. The solution compiles with no problem in VS directly.

However, when I try to compile the same solution in TeamCity, it fails with error:

Program.cs(13, 25): error CS0246: The type or namespace name 'ClassLibrary1' could not be found (are you missing a using directive or an assembly reference?)

As far as I understand, the .sln file contains the required information to retrieve the dependency project.

What can I do help TeamCity cmpile the solution?

+1  A: 

Check the build log for any MSBuild produced errors and warnings.

Check you have defined a reference to the project, but not to the output of the project.

Check the compilation of ClassLibrary1 succeedes.

Yes, .sln file should contain the required information.

Could you please try running the build from console using msbuild.exe. Does it work? msbuild.exe mySolution.sln /t:Rebuild

Try settings target Rebuild

What user account is used to run build agent windows service?

Eugene Petrenko
A: 

The problem was that the .sln file was repeated on the repository, on two different locations, and I configured the TeamCity to build the wrong one...