Upgraded TFS 2008 build definitions to TFS 2012 build defs using Upgrade Template, errors when queueing builds

648 Views Asked by At

As the title says, we upgraded build definitions from TFS 2008 to TFS 2012 build definitions which use the upgrade template. But as part of our build process we call a custom DLL that overrides some MSBuild tasks to rewrite the build number, and other utility MSBuild tasks. However, when queuing a build in TFS 2012 for one of the upgraded build types, we're getting this error:

C:\Sites\TfsBuild\Rock.QL.Qbert.TfsCustomBuild.Targets - 1 error(s), 0 warning(s),View Log File C:\Sites\TfsBuild\Rock.QL.Qbert.TfsCustomBuild.Targets (33): The "Rock.Ql.QBert.TfsCustomBuild.BuildNumberReader" task could not be loaded from the assembly C:\Sites\TfsBuild\bin\Rock.Ql.QBert.TfsCustomBuild.dll. Could not load file or assembly 'file:///C:\Sites\TfsBuild\bin\Rock.Ql.QBert.TfsCustomBuild.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.

C:\Sites\TfsBuild\Rock.QL.Qbert.TfsCustomBuild.Targets - Targets file generated for MSBuild to use int he customization process.

Rock.Ql.QBert.TfsCustomBuild.BuildNumberReader - Represents a class that does the actual build number customization.

To emphasize, this fails when queuing builds in TFS2012 but not in TFS2008. Any ideas or pointers are appreciated.

1

There are 1 best solutions below

0
On

Most of custom dlls problems comes from they are not in the right place, so try to put any custom dlls on the build server on the following path

"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PublicAssemblies"

.

You may also put them in a folder on the source control and configure that from the build controller properties as the following image.

enter image description here