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

Task assembly may not be reported correctly when multiple tasks of the same name are used #706

Open
ladipro opened this issue Sep 29, 2023 · 1 comment

Comments

@ladipro
Copy link
Contributor

ladipro commented Sep 29, 2023

The prime example is the GenerateResource task which lives in two assemblies: Microsoft.Build.Tasks.Core and Microsoft.Build.Tasks.v3.5. The current approach of keeping track of task assemblies by the bare task name only may lead to an incorrect assembly being reported by the viewer.

The relevant data structure:

private readonly Dictionary<string, string> _taskToAssemblyMap =
new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);

MSBuild very likely does not provide enough details to fix this without first enhancing the log output in dotnet/msbuild#9290.

@KirillOsenkov
Copy link
Owner

Yes, I suspect once MSBuild logs a better message this issue will be fixed for free. There are also now messages when an assembly is loaded during task execution, perhaps we can correlate the full path of the assembly with the assembly name using those events.

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

No branches or pull requests

2 participants