Questions tagged [app-config]

.NET application configuration files contain settings specific to an application.

0
votes
0answers
18 views

Auto load OnDemand prism modules when others are set to Startup in app.config

We are using Prism 7 with unity for a WPF application. There are a set of prism modules that have dependencies on other modules. I would like to be able to do all configuration via app.config to ...
0
votes
2answers
39 views

Adding app.config (Application Configuration File) in Visual Studio Professional 2017

I can't get the Application Configuration File template to show up under my Add > New Item > Visual C#. I've run a repair. I've uninstalled and reinstalled. I've deleted and added Cache folders. I've ...
0
votes
0answers
22 views

How do I use binding redirects on a .NET COM DLL with an unmanaged client?

Here’s the architecture. I have a communications library (using Kestrel and Websockets) in a C# class library DLL. Let’s call it “Communication.dll”. I also have a C# class library (“ComObject.dll”) ...
1
vote
1answer
29 views

How do I set an unmanaged application's prefered CLR (<supportedRuntime>) at run time?

I have an unmanaged application (MSACCESS.EXE), which dynamically loads various .NET assemblies (via COM interop). Currently, the unmanaged application automatically initializes the .NET 2.0 CLR when ...
0
votes
0answers
10 views

How make default settings in a library (NuGet package) that can be overridden in a project pulling it in?

I want to have some default settings in my library that will be distributed as a NuGet package. I want users of this library to be able to override them. How would I do this? An app.config in the ...
0
votes
0answers
8 views

Specflow tests not working in second environment due to invalid user credentials

I have created some specflow tests for an order submission API and set-up two additional app.config files for BVT and UAT environments with specific API urls, user subscription key, and Basic ...
0
votes
0answers
13 views

Visual Studio updates app.config with leading spaces for indentation

After a developer edits a Settings.settings file, Visual Studio updates the corresponding app.config. It always changes the app.config file to use leading spaces. Like all right-thinking people, I ...
1
vote
1answer
19 views

IOException when referencing App.xaml's ResourceDictionary

I'm trying to reference App.xaml's ResourceDictionary from a separate WPF window. I want to use resources from there in different windows, and this seems like the recommended way to do it. ...
0
votes
1answer
15 views

App.Config of managed DLL when referenced by an un-managed EXE

I have a managed DLL (MyAssembly.dll) written in C#. I am storing configuration settings in the Properties.Settings list that is serialized by Visual Studio to the app.config. All nice and dandy. I ...
0
votes
0answers
9 views

Why in my setup SlowCheetah is not performing a transformation?

I'm trying perform an xml transformation on "some.config" file in my very small isolated project. In web project it was enough to add additional "BeforeBuild" action in .csproj and MSBuild was ...
0
votes
0answers
11 views

How to use same config file with multiple deployed executables

I have a deployment that has several Windows services and one primary executable. I am wondering how to get them to all use the same Connectionstrings.config file. I am already doing this in Visual ...
0
votes
0answers
19 views

Unrecognized configuration section system.net in .NET 4.6 application

There's a plugin-based application, that runs on .NET 4.6.2. Plugins call another SOAP/REST services. They are mostly netstandard2.0 class libraries, but there are some .NET 4.6.2 plugins too. ...
6
votes
2answers
181 views

.NET tracing in PowerShell without creating .config file

I know I can enable .NET tracing by adding <system.diagnostics> element to App config (powershell.exe.config) in PowerShell installation folder. This is covered in System.Net tracing in ...
0
votes
1answer
24 views

ConfigurationManager - get section inside of section group

I'm trying to do something very simple: Read the contents of a section that is part of a section group in my App.config file. This should be easy - right? Turns out I've been trying to do this for ...
0
votes
0answers
29 views

Where to add httpRuntime in app.config to increase HttpClient request timeout for console application?

I am consuming different web api from console application through HttpClient. It works fine if processing done and response return from web api within 1 minute. But if it run more than that then it ...
0
votes
0answers
22 views

ASP.NET Config File only for some build configs

I use a File attribute for application configs in development, allowing devs to keep their own local connections and settings: <appSettings file="Local.AppSettings.config"> <!-- non-local ...
1
vote
1answer
43 views

When does WCF load the values from app.config?

I'm having a bit of trouble with WCF and an on-boot generated app.config. This is a WPF app that consumes a WCF service. If the app is started without an app.config it will create one from an ...
1
vote
1answer
39 views

Add entityFramework section with C#

We have a WPF application which is extensible with external components developed in-house. Some external components requires new section (in this case, EntityFrameworkSection) to be added into the app....
0
votes
1answer
31 views

How to get Service Base Address in app.config?

I'd like to get the baseaddress specified in my app.config file which is "http://localhost:8733/SmgService/" from C#. I looked into Microsoft's documents however, currently I don't know how to access ...
0
votes
1answer
33 views

read from app.config instead of dll.config

I have simple console application. In application there is app.config and i have defined few settings which i fetch using ConfigurationManager class like below var setting = ConfigurationManager....
1
vote
0answers
28 views

Delete corrupt user.config instead of System.ConfigurationErrorException

I'm using an user.config to store my application settings. I can access the settings in C# for example with Properties.Settings.Default.Setting1 and the user.config file looks like that: <?xml ...
0
votes
1answer
38 views

Xamarin… How do you link a file in the Main (PCL?) project into the OS specific project?

I'm following this tutorial for setting up an app.config on a Xamarin app. The Tutorial one of the last steps is: Add this PCL app.config file as a linked file on all your platform projects. For ...
1
vote
0answers
39 views

Microsoft installer project does not update app.config files on install on Windows server 2016

I have a project where I have a Microsoft Install Project that makes MSI files. When I install this MSI on my local PC it overwrites my app.config file just fine. But when I do the same on a Windows ...
0
votes
0answers
19 views

Adding TraceListener to TraceSource defined in Config doesn't work

I have a tracesource defined in my app.config. Recently I came across this post from the microsoft docs. I noticed that they change the filter for the tracesource defined in the config. Since I'm ...
1
vote
1answer
57 views

Dependency Injection not working for IConfiguration C#.Net Core

I have injected IConfiguration using following code public class InjectorConfig { /// <summary> /// configuration for DI /// </summary> /// <param ...
0
votes
0answers
20 views

An Error has occurred while encrypting connection string

I am trying to decrypt connection string in my app.config using customized Config Protection Provider named "MyConfigProtectionProvider". I don't have code for this Customized Config Provider as it is ...
0
votes
0answers
16 views

Read changed appsettings values from app.exe.config after deploying

I have a code which reads specific characters from app.config var chars = ConfigurationManager.AppSettings["CodeChars"]; chars value is A,D,K. Couple of months later user needs additional chars ...
0
votes
1answer
42 views

Azure Pipelines: How to provide app.config?

Currently I'm building a (pet) .NET project locally. The code is managed via Git. What's local is my app.config containing credentials in the appSettings section used in unit tests. I don't want to ...
0
votes
1answer
59 views

app.config transformation not working for class library [duplicate]

I have a class library that has app.config with transformations as app.Dev.config, app.Test.config. This class library is used by a web Api that had web.config transformations as follows: Web.Dev....
0
votes
0answers
29 views

Add dynamically custom section in a app.config file with VB.NET

I have an app.config in my project and I want to add some items, but I don't want to use the "appSettings" section. I want to create dynamically in my vb.net code, the section "items", to verify if it ...
0
votes
0answers
18 views

Switching environment gives 1582 errors

In Selenium webdriver (Visual studio) I have two environments set up. When its pointed to environment A the all test are working. When I switch environment B its gives me 1582 errors. Some errors are:...
6
votes
1answer
303 views

Using an app.config file with NUnit3 in a .NET Core console app

The Environment: I've got three projects in my solution currently: A .NET Standard 2.0 library with some code I'd like to test. A .NET Core 2.2 console app that references the library to make sure ...
0
votes
0answers
31 views

How Can We Determine Which App.Config File Is Loading in VSTO Outlook Add-In?

We have a very strange problem with our VSTO Add-In. In our Add-In there are label controls that read label text values from an app.config file and display text from the configuration file to the ...
0
votes
0answers
75 views

With Visual studio 2015 build rename class library app.config to <dll name>.config

I have a class library with an app.config. With Visual studio 2017 build, the app.config is put in bin folder and renamed (dll name).config. How do I make Visual studio 2015 do the same thing? I ...
-1
votes
1answer
146 views

Adding of copyright information data to winforms application build

Copyright (C) 2019 Project - All Rights Reserved string with other information, in my case C# WinForms or WPF application, usually included into head of .cs file comment. I'm trying to figure out, ...
0
votes
0answers
6 views

When I build my Visual Studio project, my outpu App.config contains <connectionStrings> section from App.Debug.config and App.Relese.Config

When I build my Visual Studio project, my outpu App.config contains section from App.Debug.config and App.Relese.Config. Section is placed twice (one from App.Debug.config and App.Relese.Config) ...
0
votes
0answers
27 views

C# Hjson returns null after deserialization

I have a hjson file like this that I want to deserialize and work with: { "TestConfig": { "SecondConfig": { "ConnectionString": "Integrated Security = true; Data Source = dataPseudo; Initial ...
2
votes
1answer
126 views

WCF Named Pipe in Windows Service using App.Config

I am frustrated. Okay, here is the error. There was no endpoint listening at net.pipe://localhost/MyIpcAppToService that could accept the message. This is often caused by an incorrect address or ...
1
vote
1answer
33 views

How to retrieve connection strings from App.config [duplicate]

I have the following configuration in a windows forms application: <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> </configSections> <...
2
votes
1answer
36 views

WCF Service (non-web) Configuration Warning

Visual Studio keeps throwing me 2 warnings: Severity Code Description Project File Line Suppression State Warning WCF configuration validation warning: The 'name' attribute is invalid ...
0
votes
0answers
12 views

How to create setup package per environment in VS?

How to create setup project to install a windows service per environment in VS? We have a windows service, for different environment we want to have different App.config, for example, for QA we have ...
0
votes
1answer
34 views

.NET Core get array in array from config.json

I have an issue where an array object in my config.json is coming back as empty. In the following code, gridFields will come back as empty. {"grids": [{ "name": "Grid1" "gridFields": [ { ...
0
votes
2answers
58 views

How to get nested value in Xcode configuration files?

I'm trying to get a specific value inside my Xcode configuration file. So if I were to print item 0 in the example above, I know part of the code is print(Bundle.main.infoDictionary["Fonts provided ...
0
votes
0answers
17 views

EF6 app.config complete configuration option reference

I'm trying to find a complete guide to learn the configuration section inside the app.config. I currently have these sections in my app.config: <section name="entityFramework" type="System.Data....
0
votes
0answers
13 views

How to load config settings into DLL called by legacy software

I am calling a .NET DLL from FoxPro. It works great and we haven't had any issues with it thus far. However now I am trying to load some .config settings in and am running into trouble. From what I've ...
0
votes
1answer
29 views

Project referencing wrong version of DLL

My project references Microsoft.Xrm.Sdk.dll and I have included version 9.0.0.0 but when running the application I get the following error: When stepping through the code and asking what version of ...
0
votes
0answers
10 views

MS CodeAnalysis how to add assembly and .config also

I use MS CodeAnalysis, and create a reference: MetadataReference[] references = new MetadataReference[] { MetadataReference.CreateFromFile(typeof(MyWcfClient).Assembly.Location ) }; The DLL ...
0
votes
0answers
30 views

How does everyone manage developer environment config files?

We already use web.config/app.config xml transforms to for our .NET projects and are also using multiple appsettings.js files based on an environment variable for .NET CORE projects. What I'm looking ...
0
votes
2answers
41 views

How can I make <configSections> <runtime> inside <configuration> work together

This is the app.config in my WPF application: <?xml version="1.0" encoding="utf-8"?> <configuration> <configSections> <sectionGroup name="userSettings" type=...
0
votes
1answer
20 views

MS Visual Studio Add several config files

I'm adding a Project (console application) to an already existing web project in Microsoft Visual Studio 2012. I'm trying to add a number of config files depending on environment application is run ...