Since it sounds like you have multiple builds that you want to utilize this custom task dll from, I'd suggest creating a separate project file that you can Import into each of your TFSBuild.proj files. You can do something like this:
<Project DefaultTargets="" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask TaskName="MyCustomTasks.ATask" AssemblyFile="$(TeamBuildRefPath)\MyCompany.MyCustomTasks.dll" /> </Project>
The TeamBuildRefPath property resolves to C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies, so if you copy your assembly here, you can access it using this property.
Just be aware that the order of evaluation may mess you up. The target containing your copy task may fire after the UsingTask task does, so when it MSBuild attempts to resolve and load you custom task assembly, it will not have been copied into place yet. You might better off installing your custom task assembly onto the build machine(s) and just update it as necessary.
- Steve
|