tfs - 属性 "Web Deploy Publish Profile"有何用途?

标签 tfs tfsbuild publishing web-deployment azure-web-app-service

在 TFS 资源管理器中,我在“构建定义编辑器”->“流程”->“构建流程参数”->“6. 发布 - Azure 网站”->“Web 部署发布配置文件”下找到了此属性:

enter image description here

我下载了发布配置文件,但 TFS 构建报告以下错误:

Overall Build Process
Update Build Number
Run On Agent (reserved build agent Hosted Build Agent)
Create Workspace
Get Workspace
Create Label
Compile, Test, and Associate Changesets and Work Items
Compile and Test
Fetch Azure Web Site Publish Profile
Run MSBuild for Project
Built $/myproj/myproj/myproj.sln for default targets.
Built $/myproj/myproj/myproj/myproj.csproj for default targets.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets (4435): The value for PublishProfile is set to 'myproj.azurewebsites.net', expected to find the file at 'C:\a\src\myproj\myproj\myproj\Properties\PublishProfiles\myproj.azurewebsites.net' but it could not be found.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets (4449): Target ValidatePublishProfileSettings Failed MSBuild Log File
Handle Exception
Create Work Item
Associate Changesets and Work Items
Exception Message: MSBuild error 1 has ended this build. You can find more specific information about the cause of this error in above messages. (type BuildProcessTerminateException)
Exception Stack Trace:
at System.Activities.Statements.Throw.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
Drop Files to Drop Location
Work item '4: Build Failure in Build: myproj_2012-55-10_07-55.1' was opened by the build.

最佳答案

我遇到了类似的问题,实际上没有很多关于build设置的文档。我从你的屏幕截图中看到你正在使用 .publishsettings 文件,但我无法让它工作,相反我认为你需要一个 .pubxml 文件。

试试这个:

  • 右键单击项目并选择发布(或发布网站)
  • 您将看到发布向导,在配置文件选项卡上选择导入并选择从 Azure 门户下载的文件。
  • 关闭向导。 (我第一次手动发布,但我不认为这是必要的)。此时 Visual Studio 应该已经创建了 3tow .pubxml 文件。一份用于 webdeploy,一份用于 ftp。
  • 将此文件 checkin 源代码管理系统中的某处
  • 在问题的第一个屏幕截图中使用其源代码管理文件夹位置来选择第 6 步中的文件。

希望有帮助,它为我解决了这个问题。

关于tfs - 属性 "Web Deploy Publish Profile"有何用途?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13798356/

相关文章:

tfs - 如何在 TFS Build 2010 中执行简单的 Exec 事件

tfs - 无法将队列添加到现有 TFS 2015 构建代理池

unit-testing - 在哪里放置 'useLegacyV2RuntimeActivationPolicy' 以在 TFS2012 中构建

visual-studio - 使用 ClickOnce 发布时,Visual Studio 不断询问 FTP 密码

tridion - 发布目标 Tridion 2011

TFS 反向集成回主

c# - TFS API C# : Change work item through C#

git - 使用 TFS 个人访问 token 克隆 Git Repo

git - 使用所有历史将 Git 迁移到 TFS

WCF 将 "Metadata publishing for this service is currently disabled."页面替换为自定义页面