-
Notifications
You must be signed in to change notification settings - Fork 325
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
Adding Microsoft.VisualStudio.ArchitectureTools.PEReader.dll to Extensions #2041
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.
Should we add a test for this?
What kind of test? Kind of E2E test that loads up datacollectors? |
Yes. E2E should do. I am actually surprised that this dint get caught by any of existing tests. |
@vagisha-nidhi Please update with the set of validations you had done as well. (code coverage and non-code coverage). |
Updated in the description. |
@singhsarab @cltshivash Added E2E test |
{ | ||
AcceptanceTestBase.SetTestEnvironment(this.testEnvironment, runnerInfo); | ||
|
||
var arguments = PrepareArguments(GetAssetFullPath("TraceCollectorLoader.dll", "netcoreapp2.0"), string.Empty, string.Empty, this.FrameworkArgValue); |
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.
Adding only netcoreapp2.0 since AppDomain is only available after netcoreapp2.0.
Documentation
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.
How does this run for net451 then ?
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.
And where is the datacollector getting enabled, I need to understand this better.
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.
We load the datacollectors only in the case of netcore as this change was made only in DotnetTestHostManager here. So net451 run without error.
var allAssemblies = AppDomain.CurrentDomain.GetAssemblies();
in the test loads datacollectors including the trace datacollector.
When we attempt to get the types of the trace datacollector, in var typeInfo = assembly.GetTypes();
it breaks with the error.
using System; | ||
using System.Linq; | ||
|
||
namespace TraceCollectorLoader |
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.
The name of the project is slightly misleading. Rename it to what is actually doing, something related to GetAssemblies.
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.
Updated
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.
Description
AppDomain.CurrentDomain.GetAssemblies()
tries to loadMicrosoft.VisualStudio.TraceDataCollector
from Extensions in VS 16.1 due to this change: https://github.com/microsoft/vstest/pull/1991/filestraceDataCollectorAssembly.GetTypes()
fails because it is not able to findMicrosoft.VisualStudio.ArchitectureTools.PEReader.dll
in Extensions folder.Validations:
Related issue
#2008