private void VerifyCloudServiceProjectComponents()
{
string CacheVersion = AzureTool.SupportAzureSdkVersion;
foreach (string roleName in Components.GetRoles())
{
string value = Components.GetStartupTaskVariable(
roleName,
Resources.CacheRuntimeVersionKey,
Resources.WebRoleStartupTaskCommandLine,
Resources.WorkerRoleStartupTaskCommandLine);
if (!string.IsNullOrEmpty(value) && !string.Equals(value, CacheVersion, StringComparison.OrdinalIgnoreCase))
{
throw new Exception(string.Format(Microsoft.WindowsAzure.Commands.Utilities.Properties.Resources.CacheMismatchMessage, roleName, CacheVersion));
}
}
}