anchor.diff:          PublishSettings.Parse(File.ReadAllText publishSettingsFile)
   
   [<AutoOpen>]
  -module private Details = 
  +module private ManagementImpl = 
   
       let urlForPackage mbraceNugetVersionTag vmSize = 
           sprintf "https://github.com/mbraceproject/MBrace.Azure/releases/download/%s/MBrace.Azure.CloudService-%s.cspkg" mbraceNugetVersionTag vmSize
  
positive.code:                 return tmp, mbraceVersion
          }
  
          let client = Credentials.connectToAzure Subscription pubSettingsFile 
          let clusterName = defaultArg ClusterName (generateResourceName())
          logger.Logf LogLevel.Info "using cluster name %s" clusterName
          let! storageAccountName = async {
  
negative.code:     let defaultExtendedProperties = dict [ "IsMBraceAsset", "true"]
      let isMBraceAsset (extendedProperties:IDictionary<string, string>) = extendedProperties.ContainsKey "IsMBraceAsset"
  
      [<NoEquality; NoComparison; AutoSerializable(false)>]
      type SubscriptionClient =
          {
              Subscription : Subscription
              Credentials : CertificateCloudCredentials
              Storage : StorageManagementClient
              ServiceBus : ServiceBusManagementClient
              Compute : ComputeManagementClient
              Management : ManagementClient 
          }
  
          static member Activate(subscription : Subscription) =
              let cert = new X509Certificate2(Convert.FromBase64String subscription.ManagementCertificate)
              let cred = new CertificateCloudCredentials(subscription.Id, cert)
              { Subscription = subscription
                Credentials = cred
                Storage = new StorageManagementClient(cred)
                ServiceBus = new ServiceBusManagementClient(cred)
                Compute = new ComputeManagementClient(cred)
                Management = new ManagementClient(cred) }
  
      type PubSettingsClient =
          {
              Default : SubscriptionClient
              Subscriptions : SubscriptionClient []
          }
  
          member c.GetClientByIdOrDefault(?id : string) =
              match id with
              | None -> c.Default
              | Some id -> c.Subscriptions |> Array.find (fun s -> s.Subscription.Id = id || s.Subscription.Name = id)
  
          member c.Item with get (id : string) = c.GetClientByIdOrDefault(id = id)
  
          static member Activate(subscriptions : seq<Subscription>, ?defaultSubscriptionId : string) =
              match subscriptions |> Seq.distinctBy (fun s -> s.Id) |> Seq.toArray with
              | [||] -> invalidArg "subscriptions" "supplied an empty set of Azure subscriptions."
              | subscriptions ->
                  let clients = subscriptions |> Array.map SubscriptionClient.Activate
                  let defaultSubscriptionId = defaultArg defaultSubscriptionId subscriptions.[0].Id
                  let defaultSubscription = clients |> Array.find (fun c -> c.Subscription.Id = defaultSubscriptionId || c.Subscription.Name = defaultSubscriptionId)
                  { Default = defaultSubscription
                    Subscriptions = clients }
  
      module Infrastructure =
          let listRegions (client:SubscriptionClient) =
              let requiredServices = [ "Compute"; "Storage" ]
              let rolesForClient = set(client.Management.RoleSizes.List() |> Seq.map(fun r -> r.Name))
              client.Management.Locations.List()
  