简体   繁体   中英

Configuration members missing from intellisense

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM