Azure / azure-sdk-for-net

This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.35k stars 4.66k forks source link

CloudContext.Clients.CreateComputeManagementClient gone? #946

Closed olaj closed 9 years ago

olaj commented 9 years ago

I have some code based on this sample and after i made some nuget upgrades it doesn't work anymore. Is this a bug or some breaking changes that (seems to) not be documented somewhere?

The error is that CreateComputeManagementClient cannot be found.

var cloudServiceName = "MyCloudService";

using (ComputeManagementClient client = CloudContext.Clients.CreateComputeManagementClient(Credentials)) { await client.HostedServices.CreateAsync( new HostedServiceCreateParameters { ServiceName = cloudServiceName, Location = LocationNames.WestUS }); }

davihar commented 9 years ago

See https://github.com/Azure/azure-sdk-for-net/issues/927

markcowl commented 9 years ago

This was removed in the major version update. Please use the constructor of the specific management client, i.e. var client = new ManagementClient(credentials)...