system.configuration

    0热度

    1回答

    我正在经历和替换应用中的以前的配置策略,以便它更有意义,但它会在应用程序加载时抛出“无法识别的属性”异常。 这里是我的配置部分 using System.Configuration; namespace MyApplication { public class MyConfigurationSection : ConfigurationSection { [C

    9热度

    1回答

    我使用app.config文件保存凭据,当我尝试找回它们,我得到了TypeLoadException如下: 未能加载类型“System.Configuration.DictionarySectionHandler” 从装配'System.Configuration,版本= 4.0.0.0,文化=中立, 公钥= b03f5f7f11d50a3a' 这是一个.NET 4.5的项目,我设置了System

    20热度

    2回答

    我的app.config文件如下: <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="ProcessConfiguration" type="Configuration.ProcessConfigurationSection, Configurati

    0热度

    1回答

    我正在使用Configuration Manager将设置存储在C#应用程序中。我有一些个人设置,我有一个可变的设置数组。 XML配置看起来是这样的: <?xml version="1.0"?> <configuration> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"

    0热度

    2回答

    我使用System.Configuration在我的组装 但只要我实现的getter/setter方法 上的代码 被灰色的顶部System.Configuration链接(在装配不使用) 配置&配置管理器得到下划线 红色是蓝绿色的。错误消息是: 找到类型和/或命名空间名称配置不能 。 (你是否缺少...等) 奇怪的是,在我的测试程序中,相同的代码 运行没有错误。有什么我需要 更改属性或程序集本身到

    11热度

    3回答

    我有一个执行FTP操作的c#.Net控制台应用程序。 目前,我在自定义配置部分中指定了设置,例如 <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="ftpConfiguration" type="FileTransferHelper.FtpLibrar

    4热度

    1回答

    配置节有一个很大的问题,并回答here,说明如何创建自定义配置部分,它能够解析以下形式的配置为.NET对象: <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="CustomConfigSection" type="ConfigTest.CustomCo

    0热度

    1回答

    我对Angular 2相当陌生,我试图完全理解如何使用外部库,特别是Bootstrap模态。 继https://www.npmjs.com/package/ng2-bootstrap-modal的指示,我跑了以下内容: npm install ng2-bootstrap-modal 在我的index.html,我核实,我有以下几点: <!--Bootstrap CSS--> <lin

    0热度

    1回答

    假设我有一个带有app.config文件的C#类库项目,并且我将它引用到一个具有web.config文件的ASP.NET项目。假设我在我的web.configAppSettings中有一个密钥,名为SmtpServerHostname。如果我在我的引用类库中也需要SmtpServerHostname,那我应该如何处理配置文件的配置?具体来说, 如果我没有定义在我的类库SmtpServerHostn

    0热度

    1回答

    比方说,我有一个的ConfigurationProperty这样定义的: [ConfigurationProperty("TheProp")] public double TheProp { get{//some code} set{//some code} } 如何检查,如果这的ConfigurationProperty有值与否?在这种情况下,DefaultValu