Repository navigation
Open
Description
I'm not sure how this works, but this seems to be using an old version of the
MSBuild.StructuredLogger package:
Line 805 in 13e3033
| MSBuild.StructuredLogger (2.1.545) |
The latest version is:
https://www.nuget.org/packages/MSBuild.StructuredLogger/2.1.814
Without the latest version, builds fail with:
Unhandled exception. Fake.Core.BuildFailedException: Target 'PrepareMSBuildTests' failed.
---> System.AggregateException: One or more errors occurred. (Unsupported log file format. Latest supported version is 14, the log file has version 15.)
---> System.NotSupportedException: Unsupported log file format. Latest supported version is 14, the log file has version 15.
at Microsoft.Build.Logging.StructuredLogger.BinLogReader.ReadRecordsFromDecompressedStream(Stream decompressedStream)+MoveNext() in C:\MSBuildStructuredLog\src\StructuredLogger\BinaryLogger\BinLogReader.cs:line 218
at Microsoft.FSharp.Collections.Internal.IEnumerator.choose@171.System.Collections.IEnumerator.MoveNext() in D:\workspace\_work\1\s\src\fsharp\FSharp.Core\seq.fs:line 178
at Microsoft.FSharp.Collections.SeqModule.ToList[T](IEnumerable`1 source)
at Fake.DotNet.MSBuildBinLog.getErrorsAndWarnings(String binLogFilePath)
at Fake.DotNet.MSBuild.handleAfterRun(String command, FSharpOption`1 binLogPath, Int32 exitCode, String project)
at Fake.DotNet.DotNet.pack(FSharpFunc`2 setParams, String project)
at Build.prepareMSBuildTests[a](a _arg1) in C:\Farkle\eng\build.fs:line 217
at Build.initTargets@417-6.Invoke(TargetParameter arg00@)
at Fake.Core.TargetModule.runSimpleInternal(TargetContext context, Target target)
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at Fake.Core.TargetModule.raiseIfError(OptionalTargetContext context)
at Fake.Core.TargetModule.runOrDefaultWithArguments(String defaultTarget)
at Build.main(String[] argv) in C:\Farkle\eng\build.fs:line 506
Reacted by Lucas Teles , Taylor Buchanan and Erik Rasmussen
Metadata
Metadata
Assignees
Labels
No labels
Activity
github-actions commentedon Apr 21, 2023
Welcome to the FAKE community! Thank you so much for creating your first issue and therefore improving the project!
baronfel commentedon Apr 21, 2023
FAKE automatically creates binlogs for most builds that are orchestrated through FAKE, and then reads the warnings/errors directly from the binlog to prevent any parsing issues. As a result, it needs to keep bumped! It should be no impact to the rest of FAKE to bump this, so I'd encourage @yazeedobaid to do so at the earliest opportunity!
KirillOsenkov commentedon Apr 21, 2023
How do you guys specify a version? Where does 2.1.545 come from in paket.lock?
I'm hitting this problem while building dotnet/msbuild#8478 (comment) with FAKE. I searched the Farkle repo, and I only found these occurrences:
Doesn't seem to be the "source" of where this value is flowing from?
gtbuchanan commentedon May 16, 2023
As a workaround, you can just reference the most recent version of
MSBuild.StructuredLoggerfrom your project to force it to bump the transitive dependency.thinkbeforecoding commentedon Feb 15, 2024
The latest version (2.2.206) version of MSBuild.StructuredLogger fails with a ArgumentNullException. It seems it's due to localized string not being initialized.
This can be fixed by adding the following line at the start of build script:
This could be done directly in Fake to avoid the problem
KirillOsenkov commentedon Feb 15, 2024
do you have the full callstack? mind filing an issue on https://github.com/KirillOsenkov/MSBuildStructuredLog/issues/new
I want to fix this (and I thought I did)
baronfel commentedon Feb 15, 2024
In addition, for the May release we should finally ship a version of binlogs that are forward-compatible, so you could update to the version to be released then and then not have to update ever again - until/unless you need support for a new kind of message that is introduced. But since FAKE's binlog integration is very simple (just warnings/errors) that should be enough for quite a long time.
Numpsy commentedon Feb 18, 2024
I tried to update the structured log lib to a newer version in the FAKE build a while ago and it caused the integration tests to fail, possibly because it depends on Microsoft.Build.Framework 17.5.0 which doesn't have a .NET 6 TFM anymore, so I'm not sure what the procedure to update here should be as long as everything is here is built around .NET 6.0?
KirillOsenkov commentedon Feb 18, 2024
Is this the issue you're running into?
KirillOsenkov/MSBuildStructuredLog#692
KirillOsenkov commentedon Feb 18, 2024
Basically if things fail we need to investigate and fix them.
Numpsy commentedon Feb 18, 2024
it was something like that (the CI build attempt from here seems to have expired and deleted the logs though).
Also sounds similar to #2722
anpin commentedon Apr 17, 2024
@KirillOsenkov FYI
I think I'm running in the same issue here
I have added
<PackageVersion Include="MSBuild.StructuredLogger" Version="2.2.206" />to fix aforementioned error, and it runs fine locally on my dev machine. However in the CI it fails withCall site:
EDIT: the workaround by @thinkbeforecoding does work
KirillOsenkov commentedon Apr 18, 2024
my apologies, I haven't gotten the time to get to this. For now please use Strings.Initialize() and I'll fix it properly at some point later.
xperiandri commentedon Sep 1, 2024
@Thorium have we already updated that?
KirillOsenkov commentedon Sep 1, 2024
I think the latest version should fix this without calling Strings.Initialize() manually
Numpsy commentedon Sep 2, 2024
Last I looked, doing the update was blocked by the FAKE build being pinned to Microsoft.Build 17.3.2 and the latest StructuredLogger needing 17.5.0 (and the update to that may or may not be blocked by MSBuild 17.5 having removed the .NET 6.0 TFM in favour of .NET 7.0)
Thorium commentedon Sep 2, 2024
I don't think so.
Where I'm using FAKE, I went for
MSBuild.StructuredLogger 2.2.291and then I'm using:...and it compiles.