msbuild复制文件 [英] msbuild copy files

查看:151
本文介绍了msbuild复制文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用MSbuild复制文件时遇到了麻烦,并且收到的错误消息似乎彼此矛盾(使用TFS 2008进行构建).

I am having trouble copying files with MSbuild and the error messages I'm getting seem to contradict each other (using TFS 2008 to do the build).

我当前在构建脚本中包含以下内容

I currently having the following in my build script

 <PropertyGroup>
      <ReleaseRoot>$(DropLocation)\Latest\x86\Release</ReleaseRoot>
      <WebRoot>$(ReleaseRoot)\_PublishedWebsites\Web</WebRoot>
      <DBRoot>$(ReleaseRoot)\Database</DBRoot>
      <TempHolingDir>$(ReleaseRoot)\temp)</TempHolingDir>
      <WebConfig>$(WebRoot)\Web.config</WebConfig>
      <DatabaseUpdate>$(DBRoot)\databaseupdate.exe</DatabaseUpdate>
    </PropertyGroup>

    <Copy SourceFiles="$(WebConfig);$(DatabaseUpdate)" DestinationFolder="$(TempHoldingDir)" ContinueOnError="false" />

运行构建时,我得到

错误MSB3023:无目的地 为复制指定.请提供 "DestinationFiles"或 目标目录".

error MSB3023: No destination specified for Copy. Please supply either "DestinationFiles" or "DestinationDirectory".

然后我将DestinationFolder更改为DestinationDirectory并得到

I then change the DestinationFolder to DestinationDirectory and I got

错误MSB4064: "DestinationDirectory"参数为 复制"任务不支持. 验证参数是否存在于 任务,它是一个可设置的公共 实例属性.错误MSB4063: 无法初始化复制"任务 输入参数.

error MSB4064: The "DestinationDirectory" parameter is not supported by the "Copy" task. Verify the parameter exists on the task, and it is a settable public instance property. error MSB4063: The "Copy" task could not be initialized with its input parameters.

这些错误似乎相互矛盾,我在这里到底想念什么?

THese errors seem to contradict each other, what exactly am I missing here?

推荐答案

根据

It's DestinationFolder according to Copy Task, looks like MSB3023 error text is wrong?

这篇关于msbuild复制文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆