I've asked the question
here[
^] and get the solution:
<Target Name="BeforeBuild"
DependsOnTargets="ResolveProjectReferences;ResolveAssemblyReferences">
<UnitValidationTask Files="@(Compile)"
References="@(_ResolveAssemblyReferenceResolvedFiles)" />
</Target>
Now, all the resolved references are in "References" and the full path is stored in the "Identity" property of the task item.