Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Test fixture should not use Directory.GetCurrentDirectory() #6468

Closed
dougbu opened this issue Jun 29, 2017 · 0 comments
Closed

Test fixture should not use Directory.GetCurrentDirectory() #6468

dougbu opened this issue Jun 29, 2017 · 0 comments
Assignees
Labels
Milestone

Comments

@dougbu
Copy link
Contributor

dougbu commented Jun 29, 2017

This issue causes loads of warnings when running the MVC functional tests from the command line.

Should use AppContext.BaseDirectory (easiest), Assembly.Location (for some assembly in the app), or AppDomain.CurrentDomain.BaseDirectory (if available) instead.

Note MvcWebApplicationBuilder uses both Directory.GetCurrentDirectory() and AppContext.BaseDirectory. WebApplicationTestFixture<TStartup> uses only the unreliable Directory.GetCurrentDirectory().

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

No branches or pull requests

2 participants