开发者

Why does TeamCity miss a reference and fails compilation?

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

My solution has 2 projects: ConsoleA开发者_开发百科pplication1 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?


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?


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...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜