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

[WIP]NUnit3VsAdapter to support managed sources only #500

Merged
merged 1 commit into from
Jun 12, 2018
Merged

[WIP]NUnit3VsAdapter to support managed sources only #500

merged 1 commit into from
Jun 12, 2018

Conversation

@mayankbansal018 mayankbansal018 changed the title NUnit3VsAdapter to support managed sources only [WIP]NUnit3VsAdapter to support managed sources only Apr 10, 2018
@OsirisTerje
Copy link
Member

@mayankbansal018 Can you please create an issue for this too, and link to the PR ?

@OsirisTerje OsirisTerje added this to the 3.11 milestone Apr 10, 2018
@@ -43,6 +43,7 @@ namespace NUnit.VisualStudio.TestAdapter
[FileExtension(".dll")]
[FileExtension(".exe")]
[DefaultExecutorUri(NUnit3TestExecutor.ExecutorUri)]
[Category("managed")]
Copy link
Contributor

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

Copy link
Contributor

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jnm2 Since you have been in here, can you check this now , #508 has been merged.

Copy link
Contributor

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.

@OsirisTerje OsirisTerje merged commit 3697624 into nunit:master Jun 12, 2018
@mayankbansal018
Copy link
Contributor Author

Thanks for merging this

@jnm2
Copy link
Contributor

jnm2 commented Jun 12, 2018

@OsirisTerje Well I can say it rebased without conflicts and .\build.ps1 -t test succeeded on my machine...

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

Successfully merging this pull request may close these issues.

3 participants