Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [app-config]

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

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//...
Sindhu N's user avatar
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&...
Xorcist's user avatar
  • 3,251
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 ...
Cutler Cox's user avatar
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 &...
Fedor Yudin's user avatar
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 ...
Oleg Pro's user avatar
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 = ...
John's user avatar
  • 3,877
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 <...
East of Nowhere's user avatar
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 ...
Key_coder's user avatar
  • 536
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 ...
user avatar
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 ...
akd's user avatar
  • 6,728
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>...
Velkumar's user avatar
  • 483
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="...
Jan J.'s user avatar
  • 45
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("...
Mych's user avatar
  • 2,555
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"&...
816Code's user avatar
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 ...
Czeshirecat's user avatar

15 30 50 per page
1
2 3 4 5
208