KirillOsenkov / MSBuildStructuredLog

A logger for MSBuild that records a structured representation of executed targets, tasks, property and item values.
MIT License
1.41k stars 188 forks source link

Wrong `Assembly` path displayed when one assembly is NOT strong named and the other is #669

Closed mattleibow closed 1 year ago

mattleibow commented 1 year ago

While testing my PR for strong naming build tasks in https://github.com/dotnet/maui/pull/14080, I noticed that the Assembly listed in the binlog was the wrong path. I am almost 100% sure that if it was not the case, then the task could not have run at all as the parameters - the REQUIRED parameters - are different in each version.

In my case, I have 2 versions:

I got a binlog to check:

MauiApp99_Debug_AnyCPU_Build_2023-03-31T00_35_14.1900661+02_00.zip

Here is the build for net7: image

Here is the build for net8: image

This is all in a single project, I duplicated the TFMs:

<TargetFrameworks>net7.0-android;net7.0-ios;net7.0-maccatalyst;net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-windows10.0.19041.0;net8.0-windows10.0.19041.0</TargetFrameworks>
KirillOsenkov commented 1 year ago

Good catch! Fixed.