Murray Brown
asked on
VB.net ConfigurationManager not declared
Hi. In my VB.net Excel Add-in I get the error ConfigurationManager is not declared
I tried using Imports.System.Configurati on.Configu rationMana ger but that didn't help
Dim sSQL As String = "Select * From Goals"
Dim cs As String = ConfigurationManager.Conne ctionStrin gs("task_c onn").Conn ectionStri ng
I tried using Imports.System.Configurati
Dim sSQL As String = "Select * From Goals"
Dim cs As String = ConfigurationManager.Conne
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Did you try adding the reference as I suggested before?
>I get the error "'ConfigurationManager' is not declared"
Are you sure the error says ConfigurationManager is not declared?
It looks like the error is saying ConnectionStringSettingsCo llection is not defined.
Are you sure the error says ConfigurationManager is not declared?
It looks like the error is saying ConnectionStringSettingsCo
ASKER
Adding a reference to System.Configuration did the trick
I thought that using Imports System.Configuration would be enough
but it seems that I needed to do both.
I always assumed that if you use Imports you don't have to add a reference.
Thanks for the help
I thought that using Imports System.Configuration would be enough
but it seems that I needed to do both.
I always assumed that if you use Imports you don't have to add a reference.
Thanks for the help
ASKER