I am fairly new with TeamCity, however, I am professional software developer and rather experienced with Visual Studio, C#, .NET, CLR etc. which makes this the problem described below even more strange, so far. The good thing is that computer/software problems normally have a logical solution and hope you guys can give me some insight to this. Alright, here it goes...
In the root of my E drive I have a folder in which my main workspace lives (E:\My Main). I am using Subversion and I have started using TeamCity a short while back. I have several build configurations up and running, but seem to have a problem with a specific configuration. My build folder (E:\My Builds) is sibling folder to my workspace in order to debug this issue. If I build this specific problematic build configuration it fails, and if I open the solution file (.sln) from within the build folder it also fails. The problem seen has to do with references to two of the referenced projects it seems. These projects are referenced dynamically from the application project, and there is nothing wrong with the references, however, when building through Visual Studio the application does not know the types in the two projects mentioned. To me this is really strange, since everything - as far as I can see - is as in my main workspace.
To summarize I have two apprarantly similar folders E:\My Builds and E:\My Main, one which is manually checked out, and one which is checked out through TeamCity and Subversion Folders in the two workspaces are on the same depth, however, the mentioned .sln builds in one, but not the other. So what does TeamCity or MSBuild change in the build folder which mess up the build?
Alright, say my main workspace has some dirty stuff in the folders, now I do a clean manual checkout to E:\My Workspace, and notice that this folder name is longer than the two others. I now open the solution file from within this new clean workspace and try to build the solution using Visual Studio, and it actually builds with no problems. Therefore, I assumed that the path lengths was not the problem, however, when I tried to move the two problematic projects to a shorter path, then it actually builded in all three folders. See this thread in which I was suggested this step...
Moreover, I have other build configurations currently running on the TeamCity server, which references the same two projects, and these build configurations results in successful builds, so the context in which these two projects are build are also in play, I assume, and therefore not directly to do with path lengths.
I tried to view differences on the folders and project files but found no differences except from files named format in the subversion folder .svn, and then it seems like either TeamCity og MSBuild creates files named [solution file name].metaproj and [solution file name].metaproj.sln, and during build also two files named [solution file name].teamcity and [solution file name].teamcity.msbuild.tcargs. I tried to remove the metaproj files from the build folder, and then build using Visual Studio, but this did not seem to make any difference.
To me it is not not a solution to change the folder structure in order to make TeamCity work. This due to the fact that my repository is vast and organized with strict rules, but also due to the fact that the root cause of the problem is not found, which spanws instability in the setup.
I really appreciate any help or comments to this annoying and so far strange problem, thanks,