Skip to content

FSharp.Core.fsproj : error MSB4057: The target "UpdateXlf" does not exist in the project. #5570

@omajid

Description

@omajid

Describe the Bug

Occasionally, in certain build environments, building .NET fails with

src/fsharp/src/FSharp.Core/FSharp.Core.fsproj : error MSB4057: The target "UpdateXlf" does not exist in the project. [TargetFramework=netstandard2.1]

I have seen this happen randomly in .NET 10 and .NET 11.

Steps to Reproduce

I don't have a clean way to reproduce it.

The exact same build commands work in some environments but fail in others. And sometimes a failing environment suddenly starts working.

Here's one example of a build command that fails in some environments:

+ ./build.sh --source-only --release-manifest /builddir/build/SOURCES/release.json --clean-while-building -- /p:UseSystemLibs=+brotli++rapidjson++zlib+-lttng- /p:TargetRid=fedora.45-x64 /p:OfficialBuilder=Fedora /p:MinimalConsoleLogOutput=false /p:ContinueOnPrebuiltBaselineError=true

Here's a build log: https://download.copr.fedorainfracloud.org/results/@dotnet-sig/dotnet-preview/fedora-rawhide-x86_64/10481702-dotnet11.0/builder-live.log.gz

    System.CodeDom -> /builddir/build/BUILD/dotnet11.0-11.0.100_preview.4.26230.115-build/dotnet-11.0.100-preview.4.26230.115/src/runtime/artifacts/bin/System.CodeDom/stub/Release/net11.0/System.CodeDom.dll
    System.ServiceModel.Syndication -> /builddir/build/BUILD/dotnet11.0-11.0.100_preview.4.26230.115-build/dotnet-11.0.100-preview.4.26230.115/src/runtime/artifacts/bin/System.ServiceModel.Syndication/stub/Release/net11.0/System.ServiceModel.Syndication.dll
    Microsoft.FSharp.Compiler -> /builddir/build/BUILD/dotnet11.0-11.0.100_preview.4.26230.115-build/dotnet-11.0.100-preview.4.26230.115/src/fsharp/artifacts/bin/Microsoft.FSharp.Compiler/Release/net11.0/Microsoft.FSharp.Compiler.dll
  /builddir/build/BUILD/dotnet11.0-11.0.100_preview.4.26230.115-build/dotnet-11.0.100-preview.4.26230.115/src/fsharp/src/FSharp.Core/FSharp.Core.fsproj : error MSB4057: The target "UpdateXlf" does not exist in the project. [TargetFramework=netstandard2.1]
    FSharp.Core -> /builddir/build/BUILD/dotnet11.0-11.0.100_preview.4.26230.115-build/dotnet-11.0.100-preview.4.26230.115/src/fsharp/artifacts/bin/FSharp.Core/Release/netstandard2.0/FSharp.Core.dll
    System.IO.FileSystem.DriveInfo -> /builddir/build/BUILD/dotnet11.0-11.0.100_preview.4.26230.115-build/dotnet-11.0.100-preview.4.26230.115/src/runtime/artifacts/bin/System.IO.FileSystem.DriveInfo/Release/net11.0-unix/System.IO.FileSystem.DriveInfo.dll
    FSharp.DependencyManager.Nuget -> /builddir/build/BUILD/dotnet11.0-11.0.100_preview.4.26230.115-build/dotnet-11.0.100-preview.4.26230.115/src/fsharp/artifacts/bin/FSharp.DependencyManager.Nuget/Release/netstandard2.0/FSharp.DependencyManager.Nuget.dll
    FSharp.Compiler.Service -> /builddir/build/BUILD/dotnet11.0-11.0.100_preview.4.26230.115-build/dotnet-11.0.100-preview.4.26230.115/src/fsharp/artifacts/bin/FSharp.Compiler.Service/Release/netstandard2.0/FSharp.Compiler.Service.dll
    System.Xml.XPath.XDocument -> /builddir/build/BUILD/dotnet11.0-11.0.100_preview.4.26230.115-build/dotnet-11.0.100-preview.4.26230.115/src/runtime/artifacts/bin/System.Xml.XPath.XDocument/ref/Release/net11.0/System.Xml.XPath.XDocument.dll
    The package FSharp.Compiler.Service.43.12.101-preview4.26230.115 is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn why package readmes are important.
    Successfully created package '/builddir/build/BUILD/dotnet11.0-11.0.100_preview.4.26230.115-build/dotnet-11.0.100-preview.4.26230.115/src/fsharp/artifacts/packages/Release/Dependency/Shipping/FSharp.Compiler.Service.43.12.101-preview4.26230.115.nupkg'.
  /builddir/build/BUILD/dotnet11.0-11.0.100_preview.4.26230.115-build/dotnet-11.0.100-preview.4.26230.115/src/fsharp/src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.fsproj(96,5): error MSB4181: The "MSBuild" task returned false but did not log an error.
  
  Build FAILED.
  
  /builddir/build/BUILD/dotnet11.0-11.0.100_preview.4.26230.115-build/dotnet-11.0.100-preview.4.26230.115/src/fsharp/src/FSharp.Core/FSharp.Core.fsproj : error MSB4057: The target "UpdateXlf" does not exist in the project. [TargetFramework=netstandard2.1]
  /builddir/build/BUILD/dotnet11.0-11.0.100_preview.4.26230.115-build/dotnet-11.0.100-preview.4.26230.115/src/fsharp/src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.fsproj(96,5): error MSB4181: The "MSBuild" task returned false but did not log an error.

Other Information

I don't know the exact trigger yet. I am still investigating.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-buildImprovements in source-build's own build process

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Servicing

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions