 <p>I'm not sure if I expressed my problem very well, but now I've found the solution.</p> <p>In my .proj file, I reference my custom task with the following syntax...</p> <pre><code>&lt;UsingTask AssemblyFile="..\lib\MyCompany.MSBuild\MyCompany.MSBuild.dll" TaskName="CreateDatabase" /&gt; </code></pre> <p>My CreateDatabase task relies on various 3rd-party assemblies. However, some of these are only referenced via reflection, so weren't included by default in the folder "..\lib\MyCompany.MSBuild".</p> <p>I had been trying to get the task to work by placing the required assemblies in the same directory as the .proj file invoking the task.</p> <p>However, what I should have been doing was putting the assemblies in the referenced task directory "..\lib\MyCompany.MSBuild\".</p> <p>Simple!</p>