Xml 如何在生成脚本中使用XCopy而不是在Windows中使用copy

Xml 如何在生成脚本中使用XCopy而不是在Windows中使用copy,xml,build,command-prompt,nant,xcopy,Xml,Build,Command Prompt,Nant,Xcopy,早些时候,为了将我的dotnet项目部署到远程服务器,我在nant构建配置文件中使用了copy命令。命令如下所示 <target name="Deploy"> <copy todir="${path.to.the.directory}" overwrite="true"> <fileset basedir="${Bin.Path}"> <include name="*.*" />

早些时候,为了将我的dotnet项目部署到远程服务器,我在nant构建配置文件中使用了copy命令。命令如下所示

<target name="Deploy">
    <copy  todir="${path.to.the.directory}" overwrite="true">
        <fileset basedir="${Bin.Path}">
            <include name="*.*" />          
        </fileset>
    </copy>
</target>

现在,随着项目的发展,我在$[bin.path]文件夹中获得了两个新文件夹,现在我无法使用copy命令将可执行文件复制到输出文件夹

我能做什么


搜索之后,我发现我可以使用XCopy。但我不知道如何将其集成到与上面所示类似的构建脚本中。

我想知道为什么您得出结论,您不能使用
任务

如果需要将子文件夹包括到副本集中,请将NAnt脚本更改为:

<target name="Deploy">
    <copy  todir="${path.to.the.directory}" overwrite="true">
        <fileset basedir="${Bin.Path}">
            <include name="**\*.*" />          
        </fileset>
    </copy>
</target>

希望这有帮助。

我想知道为什么您得出结论,您不能使用
任务

如果需要将子文件夹包括到副本集中,请将NAnt脚本更改为:

<target name="Deploy">
    <copy  todir="${path.to.the.directory}" overwrite="true">
        <fileset basedir="${Bin.Path}">
            <include name="**\*.*" />          
        </fileset>
    </copy>
</target>
希望这有帮助