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

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

    1. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *