msbuild 错误 MSB3191:在远程服务器中发布时无法创建目录

msbuild error MSB3191: Unable to create directory while publishing in remote server

我正在尝试使用 Bamboo 将 .Net 项目部署到远程服务器。 我是竹子的新手 我使用了 msbuild 任务

msbuild <solution file> /p:DeployOnBuild=true /p:PublishProfile="publishXMLFile"

发布 XML 文件:

<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 <PropertyGroup>
   <WebPublishMethod>FileSystem</WebPublishMethod>
   <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
   <LastUsedPlatform>Any CPU</LastUsedPlatform>
   <SiteUrlToLaunchAfterPublish />
   <LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
   <ExcludeApp_Data>False</ExcludeApp_Data>
   <publishUrl>\<server.IP.Address>\Path\To\Publish\Folder</publishUrl>
   <DeleteExistingFiles>True</DeleteExistingFiles>
 </PropertyGroup>
</Project>

Current 在服务器中以用户管理员权限登录,文件夹也已共享。 我仍然收到以下错误:

 C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Deploy\Microsoft.Web.Publishing.Deploy.FileSystem.targets(93,5): error MSB3191: Unable to create directory "\<server.IP.Address>\Path\To\Publish\Folder". Access to the path '\<server.IP.Address>\Path\To\Publish\Folder' is denied. [C:\bamboo\bamboo-agent-home\xml-data\build-dir2710426-132546751\Project\Path\ProjectName.csproj]

我不明白我错过了什么。

我是竹子新手。

错误消息说权限被拒绝。请检查 Bamboo 用户是否有创建或修改目录的权限。 “\\Path\To\Publish\Folder”。它可能缺少递归权限。