Skip to content
New issue

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

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

Already on GitHub? # to your account

Tests need extra work to enable switches in .NET Framework #2

Open
dougbu opened this issue Sep 16, 2017 · 0 comments
Open

Tests need extra work to enable switches in .NET Framework #2

dougbu opened this issue Sep 16, 2017 · 0 comments

Comments

@dougbu
Copy link

dougbu commented Sep 16, 2017

The app.config approaches described in README.md don't work when testing with .NET Framework. While dotnet test --framework netcoreapp2.0 correctly uses settings from {TestAssemblyName}.runtimeconfig.json, the same is not true of dotnet test --framework net462 and settings from {TestAssemblyName}.dll.config.

I ended up changing $env:UserProfile\.dotnet\x64\sdk\2.1.0-preview1-007042\TestHost\testhost.x86.exe.config to add the setting and get it recognized in full-framework test runs. Feels like an ugly hack…

I suggest an update to README.md. Might also be worth checking around for other approaches.

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

No branches or pull requests

1 participant