Reputation: 4694
Project is running fine in visualstudio2010 but If I try to run build using TFS build it is giving me following error.
Z:\TFSBuilds\1\box\IT\Sources\IT\it.vbproj (2113): The "BuildTasks.IncrementBuildNumber" task could not be loaded from the assembly Z:\TFSBuilds\1\box\IT\Sources\IT\WinAssemblyInfo.dll. Could not load file or assembly 'file:///Z:\TFSBuilds\1\box\IT\Sources\IT\WinAssemblyInfo.dll' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> 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.
While other projects are building fine. Any idea what's missing, what I am doing wrong.
Upvotes: 1
Views: 391
Reputation: 8544
The following answer assumes that your module WinAssemblyInfo.dll
is checked in in Source Control:
A clean way to proceed is to check the build log.
To this purpose, Queue a new build with setting @ Parameters "Logging Verbosity" = "Diagnostic".
Once this fails again, open up the log & navigate to section Get Workspace
. Search if your missing assembly WinAssemblyInfo.dll
has been downloaded to the Workspace - along with all its' dependencies. A rather common pitfall is that you haven't inserted the source control directory that contains the module ($/.../WinAssemblyInfo.dll
) in the list of Working Folders of Tab "Workspace" in the Build Definition.
Another option, still assuming that WinAssemblyInfo.dll
is checked in in Source Control:
Does this assembly enforce anything on other source modules? If so, this might be a missing-rights issue. The default User conducting the TFS-Build is Network-Service and it's possible that this user has less rights that yourself.
In each of my TeamProjects, to this exact purpose, I have added the Build-Server as a Project Admin.
That's possible with right-clicking on the TeamProject, then 'TeamProject Settings'>'Group Membership...', then dbl-click '[]\Project Administrators', then 'Add' a "Windows User or Group":
Click on "Object Types.." & select "Computers".
When you now enter the server-name, it should appear.
Upvotes: 2