KirillOsenkov / MSBuildStructuredLog

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

Collection was modified #558

Closed KirillOsenkov closed 2 years ago

KirillOsenkov commented 2 years ago

https://github.com/xoofx/dotnet-releaser/issues/5#issuecomment-1026067671

KirillOsenkov commented 2 years ago

@rgwood I have a potential fix here: https://www.nuget.org/packages/MSBuild.StructuredLogger/2.1.624

I'm flying blind as I couldn't repro the bug on my machine.

Could you please give it a try? Just replace StructuredLogger.dll from the NuGet above in dotnet-releaser and see if the intermittent logger crashes go away. If it's not easy to replace we can ask @xoofx to bump to 2.1.624 again. But of course I'd prefer to validate first before bumping it over and over again.

KirillOsenkov commented 2 years ago

I wrote some reflection against generic types blindly without testing or debugging, so my confidence in the fix is... humble. But let's give it a shot.

rgwood commented 2 years ago

Thanks! I’m on vacation and might not be able to test for a few days but I’ll set a reminder.

rgwood commented 2 years ago

Had some time in the airport, cloned the latest dotnet-releaser and ran it 5x but unfortunately (fortunately?) I couldn’t reproduce this exception.

KirillOsenkov commented 2 years ago

I'll close this for now but feel free to reopen if you still see any issues with 2.1.624.

Thanks!