-
Notifications
You must be signed in to change notification settings - Fork 326
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
WorkingDirectory coming incorrectly for .NET Core and .NetFramework #311
Comments
Commit : b554ca7 |
I am seeing same problem. test host used is: Directory.GetCurrentDirectory() is: I am using xunit 2.2.0 and xunit.runner.visualstudio 2.2.0 |
@dazinator Can you please try |
@smadala i tested out |
|
hello @singhsarab |
This is interesting, as I tested this scenario and it works fine. Can you please try the following commandline |
@singhsarab its working now. i guess i was relying on the debug mode to check the result of GetCurrentDirectory() conveniently. If it is relevant in my case it is still |
In VS 2017 release, It seems that Is this intended? Because it doesn't look like it's intended. |
@cwharris Yes, you are right,It is a bug, has been fixed, fix will be available VS 2017 update 1. |
-Fixed to handle cross platform new lines; -Addressed MSTest but which required setting the initial directory to be the location of the assembly (required due to bug - see See microsoft/vstest#311)
…icrosoft/vstest#311 - Converted all new lines to use Evironment.NewLine - Used reflection to locate directory of test assembly and then switched that to the current directory due to incorrect starting directory as described at See microsoft/vstest#311
-Fixed to handle cross platform new lines; -Addressed MSTest but which required setting the initial directory to be the location of the assembly (required due to bug - see See microsoft/vstest#311)
…icrosoft/vstest#311 - Converted all new lines to use Evironment.NewLine - Used reflection to locate directory of test assembly and then switched that to the current directory due to incorrect starting directory as described at See microsoft/vstest#311
Description
With .Net Core 1.0, Working DIrectory is IDE folder whereas with .Net framework, it is System32 folder.
Steps to reproduce
When test app targets only .NET Core 1.0:
Directory.GetCurrentDirectory() = C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE
When test app targets both .NET core 1.0 and .NET Framwork:
(netcoreapp1.0;net451)
Directory.GetCurrentDirectory() = C:\Windows\system32
Expected behavior
Actual behavior
The text was updated successfully, but these errors were encountered: