msbuild copy files

扶醉桌前 提交于 2019-12-12 11:22:41

问题


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" />

When I run the build I get

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

I then change the DestinationFolder to DestinationDirectory and I got

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?


回答1:


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




回答2:


Its because you called your property TempHolingDir when your referred to it as TempHoldingDir. Its all about the d.



来源:https://stackoverflow.com/questions/6528459/msbuild-copy-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!