English 中文(简体)
rror:目前情况下不存在名称配置管理分类。
原标题:Error: The name ConfigurationManager does not exist in the current context

我在我的视觉C# Console Application(Visualroom 2005 .NET 2.0 Framework)中做了以下发言。

using System.Configuration;

我在申请中使用以下声明:

ConfigurationManager.AppSettings["SomeStringOverHere"];

I try to build the application and I get the error: The name ConfigurationManager does not exist in the current context.

任何帮助?

最佳回答

您需要参考系统:项目组合和“使用”说明。

姓名空间(有时)为各议会的“分层”。 这意味着,单一名称空间的类型实际上存在于不同的议会中。

确定哪些组装是《联邦法典》或《联邦法典》类型,将其看管国。 如果你看,请看看一下,你发现这套软件在该系统内。 通过在“大会”顶部附近进行装配。 这是您需要参考的项目。

问题回答

菲利普正确地补充了这一提法,但我实际上去了并试图下载DLL,因为我不知道有较容易的方法。

  1. right-click on add references folder in the solution explorer
  2. select the .NET tab
  3. search for the .NET reference you would like to add (in this case System.Configuration)

由于大家,这一职位对我非常有益。

  • at the solution explorer
  • select References
  • then click Add Reference from the right mouse button menu

“enterography

  • in the top right corner write "Configuration:
  • check the System.Configuration, which would show up
  • press OK

“enter

我也面临同样的问题。

I have 2 projects 1 main and 1 DLL. I have App.config file in the same Place But Connection string was defined in DLL but not in main project which is executable one as main. after adding / moving the connection string to main project APP.CONFIG file, the issue resolved.

希望这一帮助





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签