2
votes

I am building a .net 4.5.2 application using Atlassian Bamboo. The build has been operating fine with dependencies on Telerik.Windows.Controls.Data for several weeks.

On a recent feature branch I have added a dependency on Telerik.Windows.Controls.GridView.dll version 2015.3.1104.45. Now the build is failing.

warning MSB3245: Could not resolve this reference. Could not locate the assembly "Telerik.Windows.Controls.GridView, Version=2015.3.1104.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. 24-Dec-2015 08:11:23

error MC3074: The tag 'RadGridView' does not exist in XML namespace 'http://schemas.telerik.com/2008/xaml/presentation'. Line 55 Position 18.

As is traditional when builds fail, I followed these triage steps:

  1. Checkout the offending commit and test build on my workstation
  2. If it "works on my machine™", log in to the build server and test build using the working directory that failed

I build both steps in the visual studio 2015 IDE. In this instance - both builds succeed. Frustrating! So I take to the command line and build the solution using the command line executed by Bamboo:

call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.com"  "SolutionNameRedacted.sln" /rebuild Release 

This also succeeds!

I noticed the following line in the bamboo log:

24-Dec-2015 08:10:23 C:\Atlassian\Data\Bamboo\xml-data\build-dir\CS-CC13-JOB1>call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 24-Dec-2015 08:10:23 '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"' is not recognized as an internal or external command,

This batch file is used to specify the compiler toolset. Is it a problem that it is not found? I always assumed compiler preferences were expressed by the project files. I have checked the Microsoft Visual Studio 14.0 directory and vcvarsall.bat does not exist anywhere.

The only significant change to the csproj file since it last built is the addition of this line:

<Reference Include="Telerik.Windows.Controls.GridView, Version=2015.3.1104.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL" />

I am at a bit of a loss as it is causing delivery to slip massively.

My current theory is that it is a user account issue and bamboo does not have access the to Telerik assembly it needs. My next steps are too:

  1. References the assembly using clr-namespace in the xaml file that is breaking
  2. Test the build on a user account with elevated permissions (sadly i don't have that kind of access)
1

1 Answers

0
votes

As it turns out, Telerik do not install their binaries to the GAC. Visual Studio require a <hintpath> entry in the csproj file to help discovery. This path should be to you install directory.

Does this sound like a faff? It is abd I'm not terribly impressed. Thankfully the Telerik VS Extension will add the reference and hintpath for you. My recommendation is to always use this wizard.

The downside - all of your developers need the Telerik library installed in the same folder. I'm pretty sure you can manually register binaries with the GAC to skirt this.