MSBuildStructuredLog
MSBuildStructuredLog copied to clipboard
Items that include '=' are stored as properties, incorrectly rendering blue in the viewer
With this example project:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="Build">
<ItemGroup>
<Thing Include="a;b=c;d = f;foo" />
</ItemGroup>
</Target>
</Project>
msbuild /bl and dotnet build /bl give MSBuild binlogs including the following content when saved as xml:
<AddItem Name="Thing">
<Item Text="a" />
<Property Name="b">c</Property>
<Property Name="d "> f</Property>
<Item Text="foo" />
</AddItem>
These show up blue in the viewer and include extra space, which is especially confusing when the items are simple filenames containing =:
#> msbuild /version
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
15.9.21.664
#> dotnet --info
...
.NET Core SDKs installed:
...
3.1.200-preview-014850 [C:\Program Files\dotnet\sdk]
...
Yes, this is known unfortunately. I need to think if I can find a workaround. We're just parsing text that MSBuild gives us. We don't have the structure here.
With TaskParameterEventArgs this may be fixed actually. Need to verify.
