Ucodia
Ucodia

Reputation: 7720

MSBuild cannot find reference when executed through TFS build service

I have a solution with reference to Telerik assemblies. The referenced version has been installed on the build server. The issue is that the continuous integration build always succeeded until I upgraded the Telerik assemblies in the solution and on my build server. The build now fails giving the classical:

Could not resolve this reference.

I checked my solution and everything is set to reference the specific version. The most suprising is that if I open the solution locally on the build server, everything will build without a problem... so that means the Telerik assemblies have been published somehow, but for an unknown reason, when MSBuild is called to compile the solution throught the build service, it does not work.

Any ideas?

Upvotes: 3

Views: 5208

Answers (3)

AkselK
AkselK

Reputation: 2593

I had the same problem after updating to the Q3 release.

To solve this, I built the solution with Logging Verbosity set to Diagnostic, and found that MSBuild never bothered to look in the Telerik folder.

So to include that folder in the build, we simply added it by adding a MSBuild argument: /p:ReferencePath="C:\Program Files\Telerik\RadControls for WPF Q3 2012\Binaries\WPF40"

It's perhaps not the best, and needs to be updated everytime you update RadControls, but it works.

We run the build server on a x86 installation, so Telerik is located under C:\Program Files, but if you run on a x64, it's under C:\Program Files(x86), so if you run several build servers on both x64 and x86 installations, you must specify both path.

Upvotes: 7

Betty
Betty

Reputation: 9189

I normally find it's better to copy the referenced assemblies into the solution and reference them from there. Then the build server and other developers don't need to worry about installing that specific version and you can support multiple projects running different versions of the component.

Upvotes: 0

Alexey Shcherbak
Alexey Shcherbak

Reputation: 3454

Try to remove-then-add reference to updated dlls - you can then see in proj file if there any differences with referenced assembly.

Enable verbose\diag mode for msbuild (/v:diag command line key) and check build logs. Diag mode have very detailed output about referenced library search process.

Upvotes: 0

Related Questions