Azure发布任务失败:msbuild错误 [英] Azure Publish task fails: msbuild error

查看:119
本文介绍了Azure发布任务失败:msbuild错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

错误MSB3021:无法复制文件"G:\ E \ T5.RestfulReceiver \ packages \ Microsoft.Cosmos.ScopeSDK.1.4841681.1 \ build \\. .\ binaries \ cosmosclientapi.dll"到"G:\ E \ T5.RestfulReceiver \ T5.RestfulReceiver \ obj \ Release \ T5.RestfulReceiver.WebApi \ G:\ E \ T5.RestfulReceiver \ packages \ Microsoft.Cosmos.ScopeSDK.1.4841681.1 \ build \\ .. \ binaries \ cosmosclientapi.dll". 不支持给定路径的格式.

注意:本地构建成功,但是发布到Azure云服务构建任务失败:

将网络发布到中间文件夹

<复制
  条件=" '@(CurrentRoleWebFiles)'!=''"
  SourceFiles ="@@(CurrentRoleWebFiles)"
  DestinationFiles ="@(CurrentRoleWebFiles->'$(IntermediateWebOutputPath)%(TargetPath)')"
  SkipUnchangedFiles ="true"/>
 


解决方案

有关详细信息,请参阅"MSBuild错误MSB3021 ".

--------------- -------------------------------------------------- ------------------------------

如果此答案有帮助,请单击标记为答案"或向上" -投票".要提供有关您的论坛体验的其他反馈,请单击 在这里 >

I am trying to publish Web Api project using VS 2015 and Azure tools 2.9 version here but i am getting the below error:

error MSB3021: Unable to copy file "G:\E\T5.RestfulReceiver\packages\Microsoft.Cosmos.ScopeSDK.1.4841681.1\build\\..\binaries\cosmosclientapi.dll" to "G:\E\T5.RestfulReceiver\T5.RestfulReceiver\obj\Release\T5.RestfulReceiver.WebApi\G:\E\T5.RestfulReceiver\packages\Microsoft.Cosmos.ScopeSDK.1.4841681.1\build\\..\binaries\cosmosclientapi.dll". The given path's format is not supported.

Could someone please advice how to fix this error which is coming from Azure.Targets file.

Note: Local build is successful but publish to azure cloud service build task fails It fails during :

Publish the web to the intermediate folder

<Copy
  Condition=" '@(CurrentRoleWebFiles)' != '' "
  SourceFiles="@(CurrentRoleWebFiles)"
  DestinationFiles="@(CurrentRoleWebFiles->'$(IntermediateWebOutputPath)%(TargetPath)')"
  SkipUnchangedFiles="true"/>

As a temporary fix would it be safe to deploy/publish by setting ContinueOnError="true" for this task?


解决方案

Check to see if the target file is locked (in use) by another application. Be sure you have permission to read the source file and to write the target file to the target folder. If the destination file path is extremely long, you may need to copy to a different location.

For more details, refer "MSBuild Error MSB3021".

-----------------------------------------------------------------------------------------------

If this answer was helpful, click "Mark as Answer" or "Up-Vote". To provide additional feedback on your forum experience, click here


这篇关于Azure发布任务失败:msbuild错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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