Visual Studio Team Services(Visual Studio Online)构建无法部署Azure云服务

时间:2016-08-01 19:55:17

标签: azure azure-devops azure-cloud-services azure-pipelines azure-pipelines-build-task

我有一个在本地计算机上成功构建和发布的解决方案。我在Team Services上创建了一个构建定义(使用新框架 - 而不是XAML构建),模仿我的本地步骤,然后运行Azure部署构建步骤。 Azure部署构建步骤始终在以下命令上失败:

Set-AzureDeployment -Upgrade -ServiceName website -Package C:\a\1\s\WebsiteSolution\Azure\bin\Production\ServiceDefinition.csdef -Configuration C:\a\1\s\WebsiteSolution\Azure\bin\Production\ServiceConfiguration.cscfg -Slot Production -Label 20160801.4 -ExtensionConfiguration <extensions>

出现以下错误:

Microsoft.WindowsAzure.Commands.Common.ComputeCloudException: BadRequest : Package conversion failed. Detailed error information: FileFormatException. ---> Hyak.Common.CloudException: BadRequest : Package conversion failed. Detailed error information: FileFormatException. at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess(Task task) at Microsoft.WindowsAzure.Management.Compute.DeploymentOperationsExtensions.UpgradeBySlot(IDeploymentOperations operations, String serviceName, DeploymentSlot deploymentSlot, DeploymentUpgradeParameters parameters) at Microsoft.WindowsAzure.Commands.Utilities.Common.ServiceManagementBaseCmdlet.ExecuteClientActionNewSM[TResult](Object input, String operationDescription, Func`1 action, Func`3 contextFactory) --- End of inner exception stack trace --- at Microsoft.WindowsAzure.Commands.Utilities.Common.ServiceManagementBaseCmdlet.ExecuteClientActionNewSM[TResult](Object input, String operationDescription, Func`1 action, Func`3 contextFactory)

是否有人知道出现问题的原因或如何使用生成的包来解决问题,使其无效?

1 个答案:

答案 0 :(得分:1)

Azure云服务部署任务需要CsPkg程序包文件。但是根据您的错误日志,您要为“CsPkg”选项指定csdef文件。更新构建定义以正确设置“CsPkg”路径,然后再次对构建进行排队。 enter image description here