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

Unsupported log file format. Latest supported version is 9, the log file has version 13. #2595

Closed
smoothdeveloper opened this issue May 27, 2021 · 14 comments

Comments

@smoothdeveloper
Copy link
Contributor

After updating VS to 16.10 release, I'm getting this out of MSBuild tasks:

(Unsupported log file format. Latest supported version is 9, the log file has version 13.)

Current work around is to adjust Fake.DotNet.MSBuildParams:

DisableInternalBinLog = true

FAKE version: 5.20.4

@github-actions
Copy link
Contributor

Welcome to the FAKE community! Thank you so much for creating your first issue and therefore improving the project!

@smoothdeveloper
Copy link
Contributor Author

If this could be caught and provide guidance as to which setting to adjust in the handling of this error, it would be stellar, because I think MS is going to keep adjusting their log file version going forward.

@0x53A
Copy link
Contributor

0x53A commented May 27, 2021

afaik you need a new version of MSBuild.StructuredLogger.

If I remember right you can just add the latest version to your own dependencies block, then it should work.

@smoothdeveloper
Copy link
Contributor Author

Thanks @0x53A, I'll give it a try when I deal with the build scripts again.

Any pointers on where / how this is all used in FAKE code itself, in case someone wants to investigate how to better report to / guide the user for similar upcoming issues on msbuild releases in the future?

@Bomret
Copy link

Bomret commented Jun 1, 2021

Just as a question but why does FAKE fail at all if it cannot read the MSBuild log file instead of just printing a warning?

@DanJensen
Copy link

Ever since installing 16.10, I'm getting errors with DotNet.build as well. The error message is complaining about a string format ArgumentNullException. However I'm posting this here because I noticed the stack trace also contains a reference to BinLog.fs. I can't find a way to disable that for dotnet.build though. Here's the stack trace:

Script reported an error:
-> BuildFailedException: Target 'BuildDotnetCore' failed.
StackTrace:
at Fake.Core.TargetModule.raiseIfError(OptionalTargetContext context) in D:\a\1\s\src\app\Fake.Core.Target\Target.fs:line 991
at Fake.Core.TargetModule.runOrDefaultWithArguments(String defaultTarget) in D:\a\1\s\src\app\Fake.Core.Target\Target.fs:line 1177
at <StartupCode$build_4B7615B8BBDC61C7A4F81F329BE7FB8C5DB6F3BD3B83224AD9457B2BEC598B92>.$Build$fsx.main@() in C:\dev\wsos\BuildScripts\build.fsx:line 1232
-> One or more errors occurred. (Value cannot be null.
Parameter name: format)
-> ArgumentNullException: Value cannot be null.
Parameter name: format
StackTrace:
at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
at System.String.Format(String format, Object[] args)
at Microsoft.Build.Logging.StructuredLogger.BuildEventArgsReader.ReadTargetSkippedEventArgs() in C:\MSBuildStructuredLog\src\StructuredLogger\BinaryLogger\BuildEventArgsReader.cs:line 298
at Microsoft.Build.Logging.StructuredLogger.BuildEventArgsReader.Read() in C:\MSBuildStructuredLog\src\StructuredLogger\BinaryLogger\BuildEventArgsReader.cs:line 171
at Microsoft.Build.Logging.StructuredLogger.BinLogReader.ReadRecordsFromDecompressedStream(Stream decompressedStream)+MoveNext() in C:\MSBuildStructuredLog\src\StructuredLogger\BinaryLogger\BinLogReader.cs:line 272
at Microsoft.FSharp.Collections.Internal.IEnumerator.choose@171.System.Collections.IEnumerator.MoveNext() in F:\workspace_work\1\s\src\fsharp\FSharp.Core\seq.fs:line 178
at Microsoft.FSharp.Collections.SeqModule.ToList[T](IEnumerable1 source) at Fake.DotNet.MSBuildBinLog.getErrorsAndWarnings(String binLogFilePath) in D:\a\1\s\src\app\Fake.DotNet.MSBuild\BinLog.fs:line 32 at Fake.DotNet.MSBuild.handleAfterRun(String command, FSharpOption1 binLogPath, Int32 exitCode, String project) in D:\a\1\s\src\app\Fake.DotNet.MSBuild\MSBuild.fs:line 738
at Fake.DotNet.DotNet.build(FSharpFunc2 setParams, String project) in D:\a\1\s\src\app\Fake.DotNet.Cli\DotNet.fs:line 1515 at Build.CompileDotnetCore@618-1.Invoke(String project) in C:\dev\wsos\BuildScripts\build.fsx:line 618 at Microsoft.FSharp.Collections.SeqModule.Iterate[T](FSharpFunc2 action, IEnumerable`1 source) in F:\workspace_work\1\s\src\fsharp\FSharp.Core\seq.fs:line 497
at Build.clo@937-53.Invoke(TargetParameter _arg23) in C:\dev\wsos\BuildScripts\build.fsx:line 938
at Fake.Core.TargetModule.runSimpleInternal(TargetContext context, Target target) in D:\a\1\s\src\app\Fake.Core.Target\Target.fs:line 300

@brase
Copy link
Contributor

brase commented Jun 8, 2021

If I remember right you can just add the latest version to your own dependencies block, then it should work.

Or simply deleting the build.fsx.lock-File.

@pchinery
Copy link
Contributor

This is a bit of an odd process, but simply changing the actual dependency in you lock file (paket.lock or build.fsx.lock, depending on your setup) just works fine:

MSBuild.StructuredLogger (2.1.507)

knocte added a commit to knocte/FSharpx.Collections that referenced this issue Sep 6, 2021
AppVeyor was failing[1] with (which seemed to be same issue as
this one: [2]):

Script reported an error:
-> BuildFailedException: Target 'Build' failed.
-> One or more errors occurred. (Unsupported log file format. Latest supported version is 9, the log file has version 13.)
-> NotSupportedException: Unsupported log file format. Latest supported version is 9, the log file has version 13

[1] https://ci.appveyor.com/project/sergey-tihon/fsharpx-collections/builds/40656359
[2] fsprojects/FAKE#2595
@knocte
Copy link
Contributor

knocte commented Sep 6, 2021

Upgrading MSBuild.StructuredLogger didn't work for me. I've tried 3 different approaches already and my AppVeyor CI still fails: fsprojects/FSharpx.Collections#176

Any hint from someone please?

@pchinery
Copy link
Contributor

pchinery commented Sep 6, 2021

You still have an old MSBuild.StructuredLogger in the FakeGroup. You can see this in the AppVeyor logs:

Downloading MSBuild.StructuredLogger 2.1.215 (FakeBuild)

you can update the lock file for that and it should fix the problem

@knocte
Copy link
Contributor

knocte commented Sep 6, 2021

you can update the lock file for that and it should fix the problem

Just changed the lock file manually (and pushed), there are no more occurrences of the old version, but CI is still failing and I still see that 2.1.215 version in the AppVeyor log. So I wonder if some dependency I have depends on an old version so I need to upgrade that dependency instead? How can I query paket to get this info? Sorry I'm a paket noob. Thanks in advance for any further help.

knocte added a commit to knocte/FSharpx.Collections that referenced this issue Sep 6, 2021
AppVeyor was failing[1] with (which seemed to be same issue as
this one: [2]):

Script reported an error:
-> BuildFailedException: Target 'Build' failed.
-> One or more errors occurred. (Unsupported log file format. Latest supported version is 9, the log file has version 13.)
-> NotSupportedException: Unsupported log file format. Latest supported version is 9, the log file has version 13

[1] https://ci.appveyor.com/project/sergey-tihon/fsharpx-collections/builds/40656359
[2] fsprojects/FAKE#2595
knocte added a commit to knocte/FSharpx.Collections that referenced this issue Sep 6, 2021
AppVeyor was failing[1] with (which seemed to be same issue as
this one: [2]):

Script reported an error:
-> BuildFailedException: Target 'Build' failed.
-> One or more errors occurred. (Unsupported log file format. Latest supported version is 9, the log file has version 13.)
-> NotSupportedException: Unsupported log file format. Latest supported version is 9, the log file has version 13

[1] https://ci.appveyor.com/project/sergey-tihon/fsharpx-collections/builds/40656359
[2] fsprojects/FAKE#2595
knocte added a commit to knocte/FSharpx.Collections that referenced this issue Sep 6, 2021
AppVeyor was failing[1] with (which seemed to be same issue as
this one: [2]):

Script reported an error:
-> BuildFailedException: Target 'Build' failed.
-> One or more errors occurred. (Unsupported log file format. Latest supported version is 9, the log file has version 13.)
-> NotSupportedException: Unsupported log file format. Latest supported version is 9, the log file has version 13

[1] https://ci.appveyor.com/project/sergey-tihon/fsharpx-collections/builds/40656359
[2] fsprojects/FAKE#2595
@yazeedobaid
Copy link
Collaborator

Can you please try the new alpha releases and see if the issue still exists?

Thanks

@yazeedobaid
Copy link
Collaborator

The fix for this issue is included in release 5.21.0

Thanks

hyazinthh added a commit to aardvark-platform/aardvark.build that referenced this issue Mar 8, 2023
The bin logger leads to a NotSupportedException if
the MSBuild version uses a log version not supported
by FAKE.

FAKE 6.0.0 cannot deal with MSBuild 17.5.0.6101.

See also: fsprojects/FAKE#2595
@hyazinthh
Copy link

This happens with FAKE 6.0.0 and MSBuild 17.5.0.6101 again.

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

Successfully merging a pull request may close this issue.

9 participants