-
Notifications
You must be signed in to change notification settings - Fork 152
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
Fix for #1307 #1309
Fix for #1307 #1309
Conversation
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.
That change seems to do it, and you may want to merge and release in order to fix the problem with the adapter. However, see my inline comment and my general comment as well.
@@ -108,7 +108,8 @@ private static string GetDotNetInstallDirectory() | |||
|
|||
private static string FindBestVersionDir(string libraryDir, Version targetVersion) | |||
{ | |||
string target = targetVersion.ToString(); | |||
if (targetVersion == null) |
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.
It may be clearer to put the null check in the calling code and never call this method with a null version. Since it's a private method and is only called in one place, I don't think a guard is really needed, but you could add one here in addition to the external check.
Here's another possibility - a bit more work maybe but could eliminate future problems. We started having problems after I put code in the engine to load .NET Core dependencies, Should we consider bypassing that code when running under the adapter? The engine could probably detect |
BTW, I am trying to strike a balance here between following procedures as they are written and common sense. As I'm no longer part of the Engine Team, I should only comment rather than approve a PR. Nevertheless, I did use the Approved selection to indicate that I think it's a good change. I also added some alternative suggestions. On the other hand, I'll now leave it to someone else to actually merge any change. |
Fix for #1307 : NUnit3TestAdapter integration: Exception when using NUnit.Engine 3.16.2
Removed the line that caused the nullref exception, as the resulting variable was not used in the method.