1

我刚刚将我的应用程序移动到另一台计算机上。第一台计算机运行的是 VS2012,第二台计算机也运行的是 VS2012。但是,在我尝试部署的第二台计算机上,我收到以下消息:

6:51:20 PM - Warning: There are package validation warnings.
6:51:20 PM - Preparing deployment for X - 12/12/2012 6:47:41 PM with Subscription ID 'X' using Service Management URL 'https://management.core.windows.net/'...
6:51:20 PM - Connecting...
6:51:22 PM - Verifying storage account 'dX'...
6:51:24 PM - Uploading Package...
6:58:57 PM - Updating...
7:02:46 PM - Role instances recycled for a certain amount of times during an update or upgrade operation. This indicates that the new version of your service or the configuration settings you provided when configuring the service prevent role instances from running. The most likely reason for this is that your code throws an unhandled exception. Please consider fixing your service or changing your configuration settings so that role instances do not throw unhandled exceptions. Then start another update or upgrade operation. Until you start another update or upgrade operation, Windows Azure will continue trying to update your service to the new version or configuration you provided
7:02:47 PM - Deployment failed with a fatal error

当我检查 Intellitrace 时,它​​告诉我加载服务运行时时出现问题。

Could not load file or assembly 'Microsoft.WindowsAzure.ServiceRuntime, Version=1.7.0.0

目前我有 1.7 DLL 加载了 CopyLocal 到 False。有谁知道为什么它不会加载。我假设我不需要将其设置为 CopyLocal - True。

仅供参考,Web 平台安装程序显示:

Windows Azure Libraries for .NET 1.7 Installed
Windows Azure Libraries for .NET 1.8 Installed
4

1 回答 1

0

根据以下错误消息,您似乎正在使用不同版本的 SDK 更新云应用程序:

 Role instances recycled for a certain amount of times during an update or upgrade operation. This indicates that the new version of your service or the configuration settings you provided when configuring the service prevent role instances from running. 
 The most likely reason for this is that your code throws an unhandled exception. Please consider fixing your service or changing your configuration settings so that role instances do not throw unhandled exceptions. 
 Then start another update or upgrade operation. Until you start another update or upgrade operation, Windows Azure will continue trying to update your service to the new version or configuration you provided

因此,您之前的应用程序可能基于 SDK 1.8,而更新的应用程序基于 SDK 版本 1.7,这就是您在 Intellitrace 中看到错误的原因。或者它还表明您的应用程序配置发生了很大变化,需要新的部署而不是更新。

您可以执行以下操作:

  • 确保两个(以前的和更新的)应用程序版本来自同一个 SDK。如果 SDK 相同,则更新可以达到特定的配置设置,但在某些情况下需要新的部署并且更新将不起作用。
  • 如果更新版本是更高版本的 SDK,并且应用程序配置基于较新 SDK 中的一些新功能进行了更改,您将不得不删除部署并部署新的。
于 2012-12-24T18:07:35.097 回答