MSBuild RecursiveDir为空
我正在尝试生成自定义MSBuild脚本,以在存储库中生成所有解决方案: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
<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| "$(ToolsHome)NuGet\NuGet.exe" restore "%(AllSolutions.Identity)""/>
</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
元数据。解决方案也是这样,即不使用输出,而只创建一个新的项目组,其中包含要在程序集任务中复制的文件??