Hi ,
I'm probably just doing something a little silly.
I get a System.Configur ation.Configura tionErrorsExcep tion!
This is my config file:
<configSections >
<section name="qConfig" type="QuickBuil d.QConfig , QuickBuild" />
</configSections>
<qConfig
PathToDevEnv="D :\Microsoft Visual Studio 8\Common7\IDE\d evenv.exe"
ShellBuild="fal se"
ShellUpgrade="f alse"
/>
This is the code:
namespace QuickBuild
{
public class QConfig : ConfigurationSe ction
{
[ConfigurationPr operty("PathToD evenv", IsRequired = true)]
public string PathToDevenv
{
get { return (string)base["PathToDeve nv"]; }
}
[ConfigurationPr operty("ShellBu ild",IsRequire d = true)]
public bool ShellBuild
{
get { return (bool)base["ShellBuild "]; }
}
[ConfigurationPr operty("ShellUp grade",IsRequir ed = true)]
public bool ShellUpgrade
{
get { return (bool)base["ShellUpgra de"]; }
}
}
}
And i get a *ConfigurationE rrorsException* when i do this:
QConfig cfg = ConfigurationMa nager.GetSectio n("qConfig") as QConfig;
With:"An error occurred creating the configuration section handler for
qConfig: Could not load type 'QuickBuild.QCo nfig ' from assembly
'QuickBuild' "
I'm working with C# 2.0 under .NET 2.0
Thanks so much
Gideon
I'm probably just doing something a little silly.
I get a System.Configur ation.Configura tionErrorsExcep tion!
This is my config file:
<configSections >
<section name="qConfig" type="QuickBuil d.QConfig , QuickBuild" />
</configSections>
<qConfig
PathToDevEnv="D :\Microsoft Visual Studio 8\Common7\IDE\d evenv.exe"
ShellBuild="fal se"
ShellUpgrade="f alse"
/>
This is the code:
namespace QuickBuild
{
public class QConfig : ConfigurationSe ction
{
[ConfigurationPr operty("PathToD evenv", IsRequired = true)]
public string PathToDevenv
{
get { return (string)base["PathToDeve nv"]; }
}
[ConfigurationPr operty("ShellBu ild",IsRequire d = true)]
public bool ShellBuild
{
get { return (bool)base["ShellBuild "]; }
}
[ConfigurationPr operty("ShellUp grade",IsRequir ed = true)]
public bool ShellUpgrade
{
get { return (bool)base["ShellUpgra de"]; }
}
}
}
And i get a *ConfigurationE rrorsException* when i do this:
QConfig cfg = ConfigurationMa nager.GetSectio n("qConfig") as QConfig;
With:"An error occurred creating the configuration section handler for
qConfig: Could not load type 'QuickBuild.QCo nfig ' from assembly
'QuickBuild' "
I'm working with C# 2.0 under .NET 2.0
Thanks so much
Gideon
Comment