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

MTP extensions - problem between 1.5.3 and 1.6.0 #5015

Closed
Evangelink opened this issue Feb 13, 2025 · 5 comments · Fixed by #5040
Closed

MTP extensions - problem between 1.5.3 and 1.6.0 #5015

Evangelink opened this issue Feb 13, 2025 · 5 comments · Fixed by #5040

Comments

@Evangelink
Copy link
Member

Describe the bug

Bump TRX report on the given sample to 1.6.0 and there will be crash.

test_plat_sent-fixed.zip

@Youssef1313
Copy link
Member

This is due to the rename of internal property from TelemetryManager to Telemetry via IVT.

By only bumping Trx, the Telemetry package used is 1.5.3, but MTP is 1.6.0. In general, it's a better idea to keep all MTP packages on the same version. So:

    <PackageReference Include="Microsoft.Testing.Extensions.TrxReport" Version="1.6.0" />
    <PackageReference Include="Microsoft.Testing.Extensions.VSTestBridge" Version="1.6.0" />
    <PackageReference Include="Microsoft.Testing.Platform.MSBuild" Version="1.6.0" />

The following shouldn't have issues.

For this specific case, I'm not sure if it's worth fixing, or if we should ask users to not update individual packages without the rest.

@Evangelink
Copy link
Member Author

The "problem" is that NUnit and xUnit current versions are not referencing latest and when people are adding the extension through the NuGet package manager they will install the latest version by default.

I'll take the day to think about what to do here.

cc @MarcoRossignoli

@Youssef1313
Copy link
Member

We could detect the MTP version via reflection and access the property with reflection or unsafe accessor when we know the name is different, but it's not ideal.

@Youssef1313
Copy link
Member

I think we can also introduce properties with the old names, they will be internal, and we can mark them Obsolete so we don't use them ourselves. But older versions of Telemetry package that are compiled against newer version of MTP can still work because the property exist.

@Evangelink
Copy link
Member Author

I think we can also introduce properties with the old names, they will be internal, and we can mark them Obsolete so we don't use them ourselves. But older versions of Telemetry package that are compiled against newer version of MTP can still work because the property exist.

Yes I think that's the best fix.

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

Successfully merging a pull request may close this issue.

2 participants