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

Forward logs to EqtTrace #776

Merged
merged 1 commit into from
Feb 17, 2021
Merged

Conversation

nohwnd
Copy link
Member

@nohwnd nohwnd commented Feb 17, 2021

When running on .NET Core forward logs to EqtTrace to be written into diag log when it is enabled.

@nohwnd
Copy link
Member Author

nohwnd commented Feb 17, 2021

Example of logs:

image

@nohwnd
Copy link
Member Author

nohwnd commented Feb 17, 2021

@Haplois  Do you know how we could safely figure out the exact version of the used adapter from the assembly metadata and print it into the log, as we do with VSTest platform? In vstest it is in Product class. But simple reflection does not work in mstest because it is portable. So I guess I need multiple implementations?

@Haplois
Copy link
Contributor

Haplois commented Feb 17, 2021

@Haplois Medeni Baykal FTE  Do you know how we could safely figure out the exact version of the used adapter from the assembly metadata and print it into the log, as we do with VSTest platform? In vstest it is in Product class. But simple reflection does not work in mstest because it is portable. So I guess I need multiple implementations?

The easiest way to get it is using System.Diagnostics.FileVersionInfo class, we can't directly map that into a commit but it's unique. In MSTest it's quite clear like to the build. Use the ProductVersion.

Examples:
MSTest: 14.0.5717.01
VSTest: 16.10.0-preview-20210216-05

@nohwnd
Copy link
Member Author

nohwnd commented Feb 17, 2021

Is that MSTest version correct? Shouldn't that be 2.1.1 or something?

@nohwnd
Copy link
Member Author

nohwnd commented Feb 17, 2021

Anyways let's merge that now, and I will look into the version later.

@nohwnd nohwnd merged commit 956f367 into microsoft:master Feb 17, 2021
@Haplois
Copy link
Contributor

Haplois commented Feb 17, 2021

Is that MSTest version correct? Shouldn't that be 2.1.1 or something?

Ah sorry, I just realized that I mislabeled; MSTest version we set at assemblies are versions of 14.*.*.* they are unique across packages but wrong.

For this (14.0.5717.01) one it basically means, this is built 57 months, and 17 days after 2016/05/01, and it was 01th build of the pipeline. (Which is 20210217.01)

([DateTime](Get-Date -Year 2016 -Month 05 -Day 17).AddMonths(57)).ToString("yyyyMMdd.")+"01"

This was referenced Mar 6, 2021
This was referenced Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants