I have the following unit test (simplified).
using Microsoft.VisualStudio.TestTools.UnitTesting;
[TestClass]
public class UnitTest1
{
[TestMethod]
public void T001b_BasePairs()
{
var config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
Console.WriteLine($"Configuration file path: {config.FilePath}");
var connectionStrings = ConfigurationManager.ConnectionStrings;
var connectionStringName = connectionStrings[0].Name;
Console.WriteLine($"Connection string name: {connectionStringName}");`
In the debugger I see UnitTestProjectCore\bin\Debug\net8.0-windows\testhost.dll
I expected the code to find connectionstrings from my app.config in the connectionStrings section.