Returning to ASP after a long journey in PHP made me had some weird and awkward situations with Visual Studio. One of them wass when I tried to use ConfigurationManager class. I included the System.Security in my reference, but then nothing seemed to show. The message kept saying that The name ‘ConfigurationManager’ does not exist in the current context!
I tried to look on the reference and check the class, it exist. Then I rebuilt my project (It was using Orchard and I needed to compile about 25 modules). Still, the same notification and build error occurred.
I tried to do it “dumb way”. I removed the using statement and commented the code line that using ConfigurationManager class. I removed the reference, too! Then I rebuilt (clean first then build). It success. I re-added the reference and rewrite the code line. Voilà it works just fine now!