In my project I had installed the Microsoft.Azure.Management.Fluent package (version 1.27) to do resource management for my azure subscription. My connection object looks like this:
AzureCredentials credentials = GenerateCredentials(); // custom method that returns my creds.
IAzure azureConn = Azure
.Configure()
.Authenticate(credentials)
.WithDefaultSubscription();
This worked fine. Today, I installed Azure.Storage.Blobs package with Nuget (version 12.4). After installing this package, I got an error:
> CS0234 C# The type or namespace name 'Configure' does not exist in the
> namespace 'Azure' (are you missing an assembly reference?)
When I uninstall the Azure.Storage.Blobs package, the error disappears. What might be going on here? I am using it in a Net Core 2.2 MVC project.
You should use the full-qualified class name instead of
Azureclass to solve the confilict, the code below is ok:The reason is that after installed
Azure.Storage.Blobs, there is a namespaceAzureincluded for blob storage. So in the code, when you typeAzure.Configure(), the compliler will confuse, theAzureisnamespaceorclass? Apprantely, it will considerAzureas a namespace(here, theAzurenamespace is for blob storage), but theConfigure()method does not in this namespce, then it will throw such error.