有什么不对劲。我正在尝试通过下面的代码片段构建和部署,但碰巧当前构建没有被部署,而如果我给出的构建号比当前构建更旧,则会被部署。我很困惑出了什么问题...您能帮帮我吗...我不确定为什么不考虑当前的内部版本号...
<PropertyGroup>
<deployappsvr>\\vdev\$(HostedFolder);\\vdev2\$(HostedFolder)</deployappsvr>
<prjbin>Release\_PublishedWebsites\RE.Service</prjbin>
</PropertyGroup>
<Target Name ="AfterEndToEndIteration" Condition=" '$(IsDesktopBuild)'!='true' ">
<!-- Starting deployment to servers -->
<Message Text="Starting deployment to servers" />
<CallTarget Targets="DeployBatching" />
<Message Text="finished deploying to servers" />
<!-- Unmap TFS mapping -->
<Exec Command="tf workfold /unmap $(tfsmap) /workspace:$(WorkspaceName) /collection:http://tfsapp:8080/tfs"/>
</Target>
<ItemGroup>
<SrcToCopy Include="$(DropLocation)\$(BuildNumber)\$(prjbin)\**\*"/>
<DestToCopy Include="$(deployappsvr)"/>
</ItemGroup>
<Target Name="DeployBatching" Outputs="%(DestToCopy.FullPath)">
<PropertyGroup>
<DestToCopy>%(DestToCopy.FullPath)</DestToCopy>
</PropertyGroup>
<RemoveDir Directories="@(DestToCopy)"/>
<MakeDir Directories="@(DestToCopy)"/>
<Message Text="111 @(SrcToCopy) 222 $(prjbin) 333 "/>
<Message Text="444 Copying source files @(SrcToCopy->'$(DestToCopy)\%(RecursiveDir)\%(Filename)%(Extension)') "/>
<Copy
SourceFiles="@(SrcToCopy)"
DestinationFiles="@(SrcToCopy->'$(DestToCopy)\%(RecursiveDir)\%(Filename)%(Extension)')"/>
<Message Text="Finished Copying source files"/>
<Exec Command="powershell Invoke-Command -computername vdev -scriptblock {md c:\buildtestfolder} > c:\power\pwrcmd.log 2>&1"/>
</Target>