TeamCity and path in Visual Studio)

Completed

(it has probably been answered before, but I cannot find it ...)

I'm starting investigating TeamCity to replace our home-made CI tools.

I was able to install and configure the tool to get code from bitbucket and launch a build. (Visual Studio sln).

Our Visual Studio solution references files (and other resources) on a mapped drive (L:)  (subst L: C:\) for historical reason.

The build fails on every line that references a file on L  
The file exists and is accessible.

"L:\usr\local\jsoncpp\jsoncpp-1.8.0\dist\jsoncpp.cpp"

If I replace the reference to its real localtion : 
"C:\usr\local\jsoncpp\jsoncpp-1.8.0\dist\jsoncpp.cpp"

it compiles.



Is this normal behaviour ? Will I need to update all my projects to link to C: instead of L: ? (not difficult, but long to do).

Thanks.

2 comments
Comment actions Permalink

Hello Maximilien,

Could you please confirm how your TeamCity agent(s) are configured? Are they running as a service or as a commandline process? What is the user identity they are using?

I am asking because I believe the mapped drives on Windows to be user-specific, so if the agent process is running as a user which has no mapped drive, it`s expected that it won`t be able to access the drive. You may try to run the agent as a command-line process using your account to see if it`s able to access the drive in question. If it works, consider adding a mapping for whatever user the agents are normally running as.
If the agent is running as a service, please mind that by default it will use SYSTEM account: https://www.jetbrains.com/help/teamcity/setting-up-and-running-additional-build-agents.html#SettingupandRunningAdditionalBuildAgents-BuildAgentasaWindowsService
In this case, you may want to change the user service will use for logon. 

Please do let me know if this was helpful or if any additional assistance is needed.

0
Comment actions Permalink

Hi, 
I have changed the user for the Agent service,I will see how it goes.

I also added 2 build steps one is to do the subst command and the other one to test if the subst works.

For now it is progressing (compiling) normally.

Thanks, 

Max.

0

Please sign in to leave a comment.