3,111 questions
0
votes
1
answer
48
views
Debug target doesn't switch when changing configuration
I have a .NET Framework WPF project (Tested on both 4.6.1 and 4.8) with two configurations, that have the AssemblyName property assigned
<PropertyGroup Condition=" '$(Configuration)|$(...
0
votes
0
answers
13
views
How to modernize NAnt build?
I'm working on the legacy codebase and it uses NAnt for build. I don't know much thing about NAnt but it works like Appsettings.json in modern .NET. My project has .NET Framework 4.7.1 and my question ...
0
votes
3
answers
58
views
C# app.config keys when running unit tests
I've spent about an hour on this. I have an app.config that's in a unit test project. When I compile/build it, it ends up in the bin folder with everything else. However, when I run said unit tests, ...
0
votes
0
answers
26
views
App.Config not found when packaging single project console app as an executable using MSBuild 'package' target
When Running a console app packaged to a single .exe with msbuild I appear to be unable to access my app.config resulting in the binding redirect errors similar to
LOG: This bind starts in default ...
0
votes
0
answers
57
views
Setting app config as a string variable instead of a config file
For my console app I have stored app.config in custom path for now
AppDomain.CurrentDomain.SetData("APP_CONFIG_FILE", "c:\path to config file");
ConfigurationManager.RefreshSection(...
0
votes
0
answers
25
views
How to use different connection strings and code depending on development or production branch in .NET framework?
The projects in question are built with .NET framework and use TFVC for version control.
I have two branches for each project, production and development. Every time something like an entity model or ...
1
vote
0
answers
28
views
How do I read global configuration file and use these in a vue3 app
What I've tried sofar:
in main.js
//Configuration
import * as config from '/config/settings.js'
app.config.globalProperties.apiUrl = config.apiUrl
app.config.globalProperties.imageBaseUrl = config....
-1
votes
1
answer
68
views
What would be the best approach for encrypting connection strings in app.config file? [closed]
My aim is to create a WPF application that will be used on different PCs and would have an app.config file with a skeleton of connection strings like this:
<connectionStrings>
<add name=&...
0
votes
0
answers
85
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
26
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
61
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
33
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
68
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
243
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
572
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 <...