Team build - solution with a reference on a network mapped drive

Hello, we are testing team build and we come to a problem. The problem is that when we are building a solution that has referenced libs on a network drive the build fails with error
---
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\Microsoft.Common.targets(0,0): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Olissipo.Common.Generic.Utilities.Utils". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
----
if in the reference path ( csproj - HINTPATH) we put a UNC \\server\share\blabla.dll it works just fine.
if we map a network drive to the same share it fails with error. How to solve this

Help anyone

Thanks


Answer this question

Team build - solution with a reference on a network mapped drive

  • dover1

    Hello, I did the TFS setup with the domain\administrator and this is the user that is running the services and it's the user I mapped the drive with.
    I think you have a point when you say it's problably a context issue but i did it all with the same user so i don't have any clue

  • BlairSh

    This is probably caused by the fact that the build is running in a different security context then you are when running the build as a normal user. When you map a network drive to e.g. drive S, then this drive is available for use as the logged on user. When you setup the TFS environment according to the installation notes, you will be running the TeamBuild service under a service account, probably tfsservice. This user has not the same network drive mapping as you have en therefore will not find the files. You can solve this by logging on as the users account used for the buildservice. Then map the drive exactly as you normally would do and make sure the drive is mapped always.

    Now when you log of and restart the service it should have the same drive mapping available and you would be good to go.

    Hope this helps,
    Marcel

  • Nay Lin

    one thing to keep in mind is that the drives are mapped after logon, that means that if you map a new drive in the same user context this drive won't be directly accessible by the service. It needs to restart, to log on again and pick up the new mapped drive. did you restart the service


  • Team build - solution with a reference on a network mapped drive