-
Notifications
You must be signed in to change notification settings - Fork 105
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
[WIP]NUnit3VsAdapter to support managed sources only #500
[WIP]NUnit3VsAdapter to support managed sources only #500
Conversation
@mayankbansal018 Can you please create an issue for this too, and link to the PR ? |
@@ -43,6 +43,7 @@ namespace NUnit.VisualStudio.TestAdapter | |||
[FileExtension(".dll")] | |||
[FileExtension(".exe")] | |||
[DefaultExecutorUri(NUnit3TestExecutor.ExecutorUri)] | |||
[Category("managed")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is causing dotnet test --framework=net46
to crash VSTest.Console.exe with:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.
The net46 tests use the net35 adapter, and the net35 adapter is here referencing System, Version=2.0.0.0
.
I'm not sure why dotnet test --framework=net46
crashes, while a direct call to VSTest.Console.exe in my Visual Studio installation does not crash. Perhaps the difference is simply in which version of VSTest is running?
/cc @OsirisTerje
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we start building with .NET Core SDK 2.0.0, this problem disappears.
2.0.0 is the oldest SDK which solves the problem. With SDK 2.0.0, dotnet test
runs VSTest version 15.7.0-preview-20180221-13
1.1.9 is the newest SDK which does not solve the problem. With SDK 1.1.9, dotnet test
runs VSTest version 15.0.0.0
.
@OsirisTerje This might be a reason to go ahead with #508?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, that fixed it. I double-checked by rebasing this branch on master on my machine.
Thanks for merging this |
@OsirisTerje Well I can say it rebased without conflicts and |
Following RFC: https://github.com/Microsoft/vstest-docs/blob/master/RFCs/0020-Improving-Logic-To-Pass-Sources-To-Adapters.md