Questions tagged [app-config]
.NET application configuration files contain settings specific to an application.
app-config
3,108
questions
0
votes
0
answers
24
views
Error: Failed to save settings: The configuration file has been changed by another program - while installing application
I received error from a user when they try to install c# application, and it throws error text like
Failed to save settings: The configuration file has been changed by another program. (C://Users//...
0
votes
1
answer
16
views
Best way to fallback on app.config when System.CommandLine options are not supplied?
Besides pre-processing args directly, is there any way to determine if an Option was NOT supplied (while still allowing a default value), in order to potentially fall back on reading <appsettings&...
0
votes
0
answers
37
views
Xunit testing of code that use System.Configuration.ConfigurationManager.AppSettings does not load App.Config from project
We are migrating code from .Net Framework to .Net 7, and one of the requirements is continuing to get configuration from App.Config files. When I try to test a library that contains a reference to a ...
0
votes
0
answers
20
views
How to change custom nested configuration App.Config from code?
I used solution from this topic How to have custom nested configuration App.Config nodes and section. But I need a possibility to change values in custom section's properties from code. Now I have &...
1
vote
1
answer
45
views
How to bind list of Enviroment Variables to Options in .NET
I have a list of environment variables located on kubernetes pod where my application is hosted, it`s have no sections, only list of variables that looks like this:
KAFKA_BOOTSTRAP_SERVERS
...
2
votes
0
answers
215
views
Set & use variable name in app service configuration that doesn't exist in web.config
Using a .NET Framework 4.8 as an API application for a website.
//web config
<add key="id" value="123" />
//code inside main project solution, this works
var Id = ...
0
votes
1
answer
377
views
Automatic binding redirection replacing the entire App.config file
I added an App.config file to my C# project and it has a lot in there: appSettings, connectionStrings, entityFramework, system.net mailSettings, etc. etc.
When I build the project, the resulting <...
0
votes
0
answers
90
views
GetLatest Value from AppConfig using terrafrom
My pipeline use few values with tf script and recently I moved all these values to Aws App Config But still few places have references within tf for monitoring purposes. How can I read this value from ...
0
votes
0
answers
37
views
how to save printer name configuration in appSettings from PrinterSettings looping in combobox in vb.net
I'm trying to save printer name configuration in appSettings from PrinterSettings looping in combobox in vb.net
but there is an error Object reference not set to an instance of an object.
in this ...
0
votes
1
answer
99
views
Is it possible to have different configuration set for the same key for multiple console apps on windows?
I have couple of console apps which have the same key in appsettings.json (ConnectionString). I need to centralise these connection strings on the machine. The best place I can think of to use ...
0
votes
0
answers
35
views
Custom Config Section Property C#
I would like to configure custom in my app.config. How do i achieve this? This is C# console applications.
can you help on this ?
<Configurations>
<ApiSettings>
<BaseUrl>...
0
votes
0
answers
43
views
JSON library version mismatch
Every Newtonsoft.Json.dll reference in projects, has maximum version of 12.0.3. In builded bin folder, in app.exe.config there is
<dependentAssembly>
<assemblyIdentity name="...
0
votes
1
answer
771
views
Nlog configuration for .net 4.8 Console application to write to DB - No logs written
I have a C#.Net 4.8 Console Application where I am trying to use NLog for logging to a MSSQL database.
My application has the following:
private static Logger nLogger = LogManager.GetLogger("...
0
votes
1
answer
113
views
C# Windows Form: pragmatically edit/update an Array of strings in resulting App.Config file
I need to pragmatically update an auto generated app.config file of a Windows Form.
Specifically an ArrayOfStrings.
Desired out put:
<setting name="Test" serializeAs="Xml"&...
0
votes
0
answers
158
views
Can I remove BindingRedirects from app.config c#/visual studio 2019?
Is it safe to remove <bindingredirects...> from app.config when one or more assemblies aren't referenced?
For example, I've several referring to Telerik in one of my app.configs after removing ...