1

几天前,我们的一个 msbuilds 开始失败,出现以下错误:

The polling operation Create Deployment failed with the error: (400) BadRequest. Error Code: BadRequest Message: The OS version specified in the .cscfg file is inactive. This means that it cannot currently be used to create, update or upgrade a deployment.
The deployment failed. Check the logs for exceptions that may have caused this failure.

Exception Message: An attempted http request against URI returned an error: (400) BadRequest. Additional Exception Information: Error Code: BadRequest Message: The OS version specified in the .cscfg file is inactive. This means that it cannot currently be used to create, update or upgrade a deployment. (type AzureHttpRequestException) Exception Stack Trace: at Microsoft.TeamFoundation.Deployment.Workflow.AzureManagement.v1_7.OperationStatusInfo.EnsureSuccessStatus(Uri requestUri) at Microsoft.TeamFoundation.Deployment.Workflow.Activities.ReportFailedPollResultAndThrow.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)

根据此页面,我们的客户操作系统版本似乎被微软视为“禁用”:https ://azure.microsoft.com/en-us/documentation/articles/cloud-services-guestos-update-matrix/

因此,我将 .cscfg 文件中的 'ServiceConfiguration' 行从 'osVersion="WA-GUEST-OS-4.26_201511-02"' 更新为 'osVersion="WA-GUEST-OS-4.29_201602-01"'。 cscfg XML 文件。但这没有帮助。

有谁知道我可以尝试的其他东西?谢谢。

4

1 回答 1

0

使用星号 (osVersion="*") 似乎已经解决了这个问题。我的构建再次工作。

根据我的一位同事的说法,我们之前对客户操作系统版本进行硬编码的原因是为了让 .NET 4.6 工作,这是必要的。可能不再需要了。

.cscfg 的完整行是:

<ServiceConfiguration serviceName="OurCompany.Azure" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="4" osVersion="*" schemaVersion="2015-04.2.6">
于 2016-03-23T18:09:19.247 回答