Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change to Settings for .NET Core support? #6

Open
TheRobotJonny opened this issue Apr 4, 2019 · 1 comment
Open

Change to Settings for .NET Core support? #6

TheRobotJonny opened this issue Apr 4, 2019 · 1 comment

Comments

@TheRobotJonny
Copy link

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!

@TheRobotJonny TheRobotJonny changed the title Change Settings for .NET Core support? Change to Settings for .NET Core support? Apr 4, 2019
@AqueM
Copy link

AqueM commented Jan 13, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants