vivrichards600/AutomatedVisualTesting

Change to Settings for .NET Core support?

TheRobotJonny opened this issue · 1 comments

Is your feature request related to a problem? Please describe.
We are developing our automated tests in .NET Core, and I am encountering errors when I run tests as it does not use app.config to find the TestDataDirectory.

Describe the solution you'd like
We would like to be able to be able to assign the directory location another way, a string, or perhaps through appsettings.json.

Describe alternatives you've considered
I have attempted to find another way to override the app.config settings, but alas my coding knowledge may be limited.

Thanks for the consideration!

AqueM commented

A workaround solution I found when I encountered this issue myself; originally suggested here: dotnet/runtime#22720 by @SidShetye

add this to the *.csproj project file

<Target Name="CopyCustomContent" AfterTargets="AfterBuild">
		<Copy SourceFiles="app.config" DestinationFiles="$(OutDir)\testhost.dll.config" />
	</Target>

It will copy the app.settings to the used *.config file.