Konrad Viltersten
Konrad Viltersten

Reputation: 39058

How to make TeamCity see the file referenced?

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.

Upvotes: 0

Views: 174

Answers (1)

mattyB
mattyB

Reputation: 1104

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.

Upvotes: 1

Related Questions