My unit test project has its own appsettings.json file.
In the same solution, I have an ASP.NET Core 3.1 WebAPI Project with an appsettings.json file.
I also have an ASP.NET Core 3.1 Razor project that has an appsettings.json file.
When I run my unit tests, the appsettings.json file from the WebAPI project is copied into the debug folder of my unit tests.
If I do a full rebuild, then the unit test project's appsettings.json file is copied into the debug folder. But then when I run a unit test (by pressing ctrl + R + T), the WebAPI project's appsettings.json file is again copied in.
I assumed that the appsettings.json file copied into the project's debug folder would correspond with the appsettings.json file in that project. (And it does for a full rebuild.)
How can I specify which appsettings.json file should be copied to the debug folder of a project's build?