5
我正在实现一个MSBuild框架,以推动组织为层次结构的许多项目的构建和部署。如何在不执行构建的情况下检索@(TargetOutputs)
<Target Name="_CoreBuild">
<MSBuild Projects="@(Project)" Targets="Build" Properties="Configuration=$(Configuration)">
<Output TaskParameter="TargetOutputs" ItemName="CompiledAssemblies" />
</MSBuild>
</Target>
为了实施适当的清洁/痛打逻辑,我想如果检索构建以当前执行的选项将被编译的文件列表。
<Target Name="_CoreClobber" DependsOnTargets="_CoreClean">
<!-- How to retrieve @(CompiledAssemblies) as if we were
building @(Project) and retrieving the @(TargetOutputs) item group.
-->
</Target>
我已经试过各种方法,包括创建一个自定义任务,我在其中建立一个进口原项目,我想要从属性/项目定制项目文件。但那并不能给我可靠的价值。
有没有办法在没有实际执行构建的情况下检索MSBuild项目的TargetOutputs项目组?