0

嗨,我有以下目标。

<Target
  Name="TestCopy"
  AfterTargets="BeforeBuild"
    >

<Message
    Text="Copying base Sitecore config files @(GenerateDuringBuild) 

        %(GenerateDuringBuild.RootDir)%(GenerateDuringBuild.Directory)UpdatedConfiguration\%(GenerateDuringBuild.Filename)\%(GenerateDuringBuild.Filename)%(GenerateDuringBuild.Extension)


        %(GenerateDuringBuild.RootDir)%(GenerateDuringBuild.Directory)UpdatedConfiguration\%(GenerateDuringBuild.Filename)\%(GenerateDuringBuild.Filename)%(GenerateDuringBuild.Extension).test
      "

        />

 <Copy
    SourceFiles="%(GenerateDuringBuild.RootDir)%(GenerateDuringBuild.Directory)UpdatedConfiguration\%(GenerateDuringBuild.Filename)\%(GenerateDuringBuild.Filename)%(GenerateDuringBuild.Extension)"
    DestinationFiles="%(GenerateDuringBuild.RootDir)%(GenerateDuringBuild.Directory)UpdatedConfiguration\%(GenerateDuringBuild.Filename)\%(GenerateDuringBuild.Filename)%(GenerateDuringBuild.Extension).test"
    Condition="!Exists('%(GenerateDuringBuild.FullPath)')"
    />


</Target>

消息输出正确的路径,但不进行复制。

该文件不存在。

4

1 回答 1

0

变量名错误。GenerateDuringBuild 用于另一项任务。学过的知识。不要复制和粘贴。

于 2013-09-19T10:40:58.777 回答