2

In my solution, I have a reference to the assembly files which are placed in network place and mapped that network to a drive letter (P:). the project files are referencing the assemblies from that drive (like P:\Assembly.dll) also, I have the snk file to sign the assembly in the same network drive. Now, I am trying to build the project using TFS 2010 Build. But, When I run the team build, it is throwing error saying

CSC: Cryptographic failure while signing assembly -- 'Error reading key file -- The system cannot find the path specified

Can anyone have idea about how to enable access to mapped network drive?

Note: The build controller is running under a user who have mapped the network drive and have permission to access the path.

Thanks.

jessehouwing
  • 87,636
  • 19
  • 214
  • 286
Elangovan
  • 1,399
  • 2
  • 22
  • 38

1 Answers1

5

The build service runs under an identity that has no drives mapped. Instead of using the mapped drive, you can use the file share location (\myserver\myshare..\myfile)

Ewald Hofman
  • 12,628
  • 3
  • 36
  • 44
  • Thanks for the answer, Is there any way to map drives for that Identity? – Elangovan Nov 01 '12 at 01:44
  • 2
    Create a [pre-build script for the TFS build definition](https://msdn.microsoft.com/en-us/library/dn376353.aspx) to run and [map the network drive](http://stackoverflow.com/questions/10175893/cant-copy-files-to-unc-destinations-if-bat-file-is-called-via-scheduled-task) there. This works for me. – dtmland May 21 '15 at 19:44