TeamCity and path in Visual Studio)


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


If I replace the reference to its real localtion : 

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


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

Comment actions Permalink

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.




Please sign in to leave a comment.