Reputation: 748
I'm currently trying to created a custom ConfigurationSection for my application, however VS2008 is not recognizing any of the members that everyone and the MSDN say are there. The only thing I see is ConfigurationException.
using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Text;
using System.Configuration;
using System.Xml;
namespace CSharpIrcBot
{
public class ServerSettings : ConfigurationSection
{
}
}
I'm trying to create a section that has the following data, that I can read and update from the application. These will be user settings.
ServerName, Port (int), RealName, NickName, UserName, ModeMask
The problem isn't that I can't figure out how, its that I am unable to even use ConfigurationSection. So my question is... where did it go?
I also seem to be missing ConfigurationManager... It doesn't show up anywhere in intellisense.
Upvotes: 1
Views: 403
Reputation: 49237
You may need to add a reference to the "System.Configuration" assembly. You can find it in "[windowsfolder]\Microsoft.NET\Framework[framework version]\". It may look like you have the System.Configuration namespace because intellisense shows a few objects in it, but you won't get all the objects until you manually add the reference.
Upvotes: 4