MSBuild RecursiveDir为空

MSBuild RecursiveDir为空,msbuild,copy,msbuild-4.0,Msbuild,Copy,Msbuild 4.0,我正在尝试生成自定义MSBuild脚本,以在存储库中生成所有解决方案: <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <SourceHome Condition=" '$(SourceHome)'=='' ">..\</SourceHome> <ToolsHome Conditi

我正在尝试生成自定义MSBuild脚本,以在存储库中生成所有解决方案:

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <PropertyGroup>
        <SourceHome Condition=" '$(SourceHome)'=='' ">..\</SourceHome>
        <ToolsHome Condition=" '$(ToolsHome)'=='' ">.\Tools\</ToolsHome>
        <Configuration Condition=" '$(Configuration)'=='' ">Release</Configuration>
        <DestFolder Condition=" '$(DestFolder)'=='' ">.\$(Configuration)\</DestFolder>
    </PropertyGroup>

    <ItemGroup>
        <AllSolutions Include="$(SourceHome)**\*.sln"/>
    </ItemGroup>

    <Target Name="Default" DependsOnTargets="Clean;Build;Assemble"/>

    <Target Name="Clean">
        <Message Text="Cleaning projects..."/>
        <MSBuild Projects="@(AllSolutions)"
             Targets="Clean"
             Properties="Configuration=$(Configuration);"/>
    </Target>

    <Target Name="RestorePackages">
        <Message Text="Restoring packages..."/>
        <Exec Command="echo y| &quot;$(ToolsHome)NuGet\NuGet.exe&quot; restore &quot;%(AllSolutions.Identity)&quot;"/>
    </Target>

    <Target Name="Build" DependsOnTargets="RestorePackages">
        <Message Text="Building projects..."/>
        <MSBuild Projects="@(AllSolutions)"
                 ContinueOnError="true"
                 Properties="Configuration=$(Configuration)">
            <Output ItemName="OutputFiles" TaskParameter="TargetOutputs"/>
        </MSBuild>
    </Target>

    <Target Name="Assemble">
        <Message Text="Assembling output..."/>
        <RemoveDir Directories="$(DestFolder)"/>
        <Copy SourceFiles="@(OutputFiles)"
              DestinationFiles="@(OutputFiles->'$(DestFolder)%(RecursiveDir)%(Filename)%(Extension)')"/>
    </Target>
</Project>

..\
工具\
释放
.\$(配置)\
但这似乎不适用于这里

我还找到了和线程,但在任何路径中都没有双斜杠或大括号。以下是复制任务期间的输出示例:

从复制文件 “x:\my\repo\SolutionDir\ProjectDir\bin\Release\Example.dll”到 “\Release\Example.dll”


即使由于代码中的通配符
**
而填充了
AllSolutions
项,但在
OutputFiles
项中没有填充
RecursiveDir
targetOutput
被放置在一个数组中,具有完整路径,但没有
RecursiveDir
元数据。

解决方案也是这样,即不使用输出,而只创建一个新的项目组,其中包含要在程序集任务中复制的文件??