I'm using VS 2008. My project connects to a database, and ConfigurationManager reads the connection string from App.config. We employ L2E.
Now that I have a basic UI for displaying data from the database for testing/verification purposes, I built a helper project called AndeDataViewer.
In the helper project, I do not wish to add any more Entity Data Models. I have updated a link to all relevant files in the new assistant project.
I ran across the following problem during compilation:
Error 15 The name 'ConfigurationManager' does not exist in the current context C:\workspace\SystemSoftware\SystemSoftware\src\systeminfo\RuntimeInfo.cs 24 40 AndeDataViewer
I believe I may have to connect a different project setting or configuration related file from the main project to the assistance project. The new helper project doesn't have an App.config file. However, it seems that I am unable to connect to that file in the assistance project. Any thoughts?
Right-click on your project and choose "Add Reference" Locate the "System.Configuration" component name in the.NET tab and press OK.
"using System.Configuration" instructs the compiler and IntelliSense to look for any classes you use in that namespace. A complete name (System.Configuration.ConfigurationManager) would have to be used each time. In contrast, the namespace or class won't be discovered anywhere if you don't include the reference.
The namespace for the file System.Configuration.dll might theoretically be "Some.Random.Name" since a DLL may have any namespace. They are often the same for consistency and clarity, although there are some exceptions.
If you encounter a problem when attempting to retrieve the cloud configuration file in your Azure Cloud service,
CloudConfigurationManager does not exist in the current context
class, all you have to do is include the
Microsoft.WindowsAzure.ConfigurationManager nuget package in your project.
Make sure to add the using statement after that.
while attempting to access the cloud configuration file in the class.
Hope this is useful!