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

Diagnostics improvement: pass testHostPath also for NoTestHostFileExist #1585

Closed
chuanboz opened this issue May 12, 2018 · 3 comments
Closed

Comments

@chuanboz
Copy link

chuanboz commented May 12, 2018

https://github.com/Microsoft/vstest/blob/47230ad1736246c63f476177064886c5c613ba8c/src/Microsoft.TestPlatform.TestHostProvider/Hosting/DotnetTestHostManager.cs#L229

if (this.fileHelper.Exists(testHostPath))
            {
                EqtTrace.Verbose("DotnetTestHostmanager: Full path of testhost.dll is {0}", testHostPath);
                args += " " + testHostPath.AddDoubleQuote() + " " + connectionInfo.ToCommandLineOptions();
            }
            else
            {
// below line shall pass in the testHostPath also, in additional to sourcePath for easier troubleshooting.
                string message = string.Format(CultureInfo.CurrentCulture, Resources.NoTestHostFileExist, sourcePath); 
                EqtTrace.Verbose("DotnetTestHostmanager: " + message);
                throw new FileNotFoundException(message);
            }

see also #1584, if I even have the full testHostPath, that trouble-shooting would be much easier than current error message.

@cltshivash cltshivash added the bug label May 14, 2018
@singhsarab
Copy link
Contributor

testHostPath changes as the code flows. This information is available in detail in the logs using /diag option. Isn't the information provided in the logs sufficient for diagnosis ?

@chuanboz
Copy link
Author

No, I've used /diag and checked the detail logs, still couldn't figure out what is wrong.
I finally figure out #1584 after I look into the source code of DotnetTestHostManager.cs, but we shouldn't expect every user to do so for troubleshooting, the error message here shall be improved to be more clear and actionable.

@singhsarab
Copy link
Contributor

This is now fixed.

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

No branches or pull requests

3 participants