Resolving “CloudConfigurationManager does not exist in the current context” compiler error

Hi,

In case you get are trying to access the cloud configuration file in your Azure Cloud service and get the error “CloudConfigurationManager does not exist in the current context” on CloudConfigurationManager class, then all you need to do is add the nuget package “Microsoft.WindowsAzure.ConfigurationManager” to your project. And then, make sure you include the using statement “using Microsoft.Azure” in the class where you’re trying to access the cloud configuration file.

Hope this helps!!

[Update]

As pointed by Matthew Harris, this doesn’t seem to work for ASP.NET 5 json configs. While trying to read configuration specified in json file, please follow the approach mentioned in the below link.

http://stackoverflow.com/questions/30575689/how-do-we-use-cloudconfigurationmanager-with-asp-net-5-json-configs/30580006#30580006

Advertisements

About Amogh Natu

Technology enthusiast, Associate Consultant @ Microsoft, music lover, love my guitar, Microsoft.NET, ASP.NET, C#.NET Professional.
This entry was posted in .NET, C# and tagged , . Bookmark the permalink.

4 Responses to Resolving “CloudConfigurationManager does not exist in the current context” compiler error

  1. goldy says:

    Thanks , it works .

  2. This didn’t solve my issue, so I’m posting this in because your page comes up high in the search results for this problem.

    For asp.net core applications the CloudConfigurationManager cannot be used but there are workarounds explained here:

    http://stackoverflow.com/questions/30575689/how-do-we-use-cloudconfigurationmanager-with-asp-net-5-json-configs/30580006#30580006

    • Amogh Natu says:

      Apologies for late response. Thank you for pointing that out. I’ve never worked on ASP.NET 5 and need to first get some hands on before I can write anything about it. 🙂 However, for now, I’ll update the post to point to the link that you’ve provided.

Your comments or opinions.....

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s