TheEdge
TheEdge

Reputation: 9851

TeamCity falis to build a solution due to pathing issues

The XXX and blurred sections in the images is the same sequence of characters and is to preserve privacy.

We have our Visual Studio 2015 solutions compartmentalized to make things easier. So physically on disk we have the following folders:

Platform
   ProjectA
Shared
   Base
   Common
   Core
   Extensions
   Frameworks
   Indentity
   Linq
   MVC
   Security
   ...

And in visual studio we use the following logical layout:

enter image description here

Note how we have a solution folder in the solution called slnXXXShared which is a convenience to hold references to some of the projects that exist physically on disk as Shared\Base etc.

Now this all works well in visual studio. However when I try and build the slnXXXPlatform on TeamCity it fails because we have something that looks like this:

The project file "D:\TeamCityBuildAgent\work\fd9f07464bf571fc..\XXXShared\XXX.Extensions\XXX.Extensions.csproj" was not found.

The problem being the ".." to move up a folder level (for the LOGICAL solution folder slnXXXShared). However when all the files are placed in the file system for use by the agent they are placed at the SAME LEVEL by TeamCity viz:

enter image description here

where the highlighted items are from the logical folder slnXXXShared previously shown from the VS solution.

So how do I fix this for TeamCity? That is deal with the ".." to move up a folder when it is not necessary? Ideally I don't want to lose the solution folder slnXXXShared from the VS solution as it helps to hide away all the referenced shared projects.

Upvotes: 2

Views: 69

Answers (1)

TheEdge
TheEdge

Reputation: 9851

This turned out to be a newbie mistake. In essence I had configured VCS roots of:

\Root\SolutionOneFolder
\Root\SolutionTwoFolder

Using both those roots would result in the same destination work folder

C:\Agent\WorkDir\

being used by the agent which contained all the contents of the above. So instead I now create a single VCS root of:

\Root

And then using this together with checkout rules I achieve separate folder layout upon checkout eg.

\Root\SolutionOneFolder => C:\Agent\WorkDir\SolutionOneFolder
\Root\SolutionTwoFolder => C:\Agent\WorkDir\SolutionTwoFolder

Upvotes: 1

Related Questions