Why does TeamCity skip the link and fail to compile?

I am completely new to TeamCity and I am using the simple Visual Studio 2008 solution to find out.

My solution has 2 projects: ConsoleApplication1 and ClassLibrary1.

ConsoleApplication1 has a link to ClassLibrary1. The solution compiles without problems in VS directly.

However, when I try to compile the same solution in TeamCity, it does not work with an error:

Program.cs (13, 25): error CS0246: the type or namespace name 'ClassLibrary1' could not be found (can you not see the link using the directive or assembly?)

As far as I understand, the .sln file contains the necessary information to extract the dependency project.

What can I do to help TeamCity reduce the solution?

+4
source share
2 answers

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

+3
source

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

Make sure that you provide a link to the project, but not to the exit of the project.

Verify that the compilation of ClassLibrary1 succeeded.

Yes, the .sln file must contain the required information.

Could you try running the assembly from the console using msbuild.exe. It works? msbuild.exe mySolution.sln / t: Repair

Try targeting Rebuild

What user account is used to start the build agent windows service?

+3
source

Source: https://habr.com/ru/post/1300686/


All Articles