我有以下的XML文件:
除了文件复制部分之外,此脚本中的所有内容都有效。我在复制部分放置的消息未出现在TeamCity的完整日志中。在后者的配置设置中,我将“DeployPrototype”作为目标放置。
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="DeployPrototype" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<dotCover>..\..\..\plugins\dotCover\bin\dotCover.exe</dotCover>
</PropertyGroup>
<ItemGroup>
<SourceFiles Include="..\Prototype\Site\Site\Bin\TestServer\Default.html;..\Prototype\Site\Site\Bin\TestServer\Site.xap"/>
<DestinationFolder Include="C:\inetpub\wwwroot\ProjectName\Prototype"/>
</ItemGroup>
<Target Name="Build">
<MSBuild Projects="../ProjectName.Web.sln" Properties="Configuration=testserver" />
<Message Text="Building ProjectName solution" Importance="high" />
</Target>
<Target Name="TeamCity" DependsOnTargets="Build">
<Message Text="Before executing MSpec command" Importance="low" />
<Exec Command="..\packages\Machine.Specifications.0.4.10.0\tools\mspec-clr4.exe ..\Hosts\ProjectName.Hosts.Web.Specs\bin\ProjectName.Hosts.Web.Specs.dll --teamcity" />
<Message Text="Ran MSpec" Importance="low" />
<Exec Command="$(dotCover) c TestServerBuildAndRunTestsOnly_DotCover.xml" />
<Message Text="##teamcity[importData type='dotNetCoverage' tool='dotcover' path='build\coverage.xml']" Importance="high" />
</Target>
<Target Name="DeployPrototype" DependsOnTargets="TeamCity">
<Message Text="Before executing copy, source files are: @(MySourceFiles) and destination folder is: @(DestinationFolder)" Importance="low" />
<Copy
SourceFiles="@(MySourceFiles)"
DestinationFolder="@(DestinationFolder)"
/>
<Message Text="Atter executing copy" Importance="low" />
</Target>
</Project>
除了文件复制部分之外,此脚本中的所有内容都有效。我在复制部分放置的消息未出现在TeamCity的完整日志中。在后者的配置设置中,我将“DeployPrototype”作为目标放置。
为什么复制操作没有发生?