0

Locally run, everything works just fine. When I execute a test from TeamCity I get the following error.

System.IO.FileNotFoundException:
Could not load file or assembly 'XXX.Lib, Version=2.0.5288.17943, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
The system cannot find the file specified. File name: 'XXX.Lib, Version=2.0.5288.17943, Culture=neutral, PublicKeyToken=null'

To remedy it, I checked that the file is referenced. I also checked in the properties that Copy Local is set to true and that Path is pointing to C:\TFS... where my version control resides.

Apparently, the file doesn't get to the right position and I'm at a loss because I don't know how to make it do what I want. Suggestions?

I strongly suspect that it's similar to this issue, right here, but I've got no idea:
1. how to get the information on where TC looks for the DLL, nor
2. How to enforce the correct path on it to look at.

Community
  • 1
  • 1
Konrad Viltersten
  • 36,151
  • 76
  • 250
  • 438
  • On your build server, have a look in the Checkout directory at the \bin\$(configuration) folder for your test project. MSBuild should have copied over all the referenced libraries as specified in your project file. Is it missing from here? What about the library-under-test's \bin\$(configuration) folder, is the missing library in there? – mattyB Jun 27 '14 at 15:18
  • @mattyB Put that as a reply so I can check the answer green. – Konrad Viltersten Jun 27 '14 at 15:49

1 Answers1

1

On your build server, have a look in the Checkout directory at the \bin\$(configuration) folder for your test project. MSBuild should have copied over all the referenced libraries as specified in your project file.

If it's missing from there, try checking the library-under-test's \bin\$(configuration) folder, and then in turn the project file for that library.

mattyB
  • 1,094
  • 10
  • 21