Skip to content

[Bug] .NET Maui projects fail to build properly through docfx #10840

@LeadAssimilator

Description

@LeadAssimilator

Describe the bug
Maui ios binding projects fail to build properly through docfx - the binding generator never runs leading to missing files in the output. While not directly shown in the repo below, this almost always results in a build failure since most binding projects have additional code that refer to the auto generated files that were never created.

To Reproduce
Steps to reproduce the behavior:

  1. create a maui library project targeting net9.0-ios
  2. set <IsBindingProject>true</IsBindingProject>
  3. using sharpie, generate and including binding files for a framework
  • <ObjcBindingApiDefinition Include="Platforms/iOS/Bindings/ApiDefinitions.cs">
  • <ObjcBindingCoreSource Include="Platforms/iOS/Bindings/StructsAndEnums.cs">
  1. init docfx project referring to maui library project with all defaults
  2. run docfx to build the project
  3. observe the binding files are never generated in obj/Release/net9.0-ios/iOS for example
  4. build the project manually in release
  5. observe binding files are generated in obj/Release/net9.0-ios/iOS as they should be

Non-Maui ios binding projects also fail:

  1. dotnet new iosbinding
  2. Put the following in ApiDefinitions.cs
    [BaseType (typeof (Foundation.NSObject))] interface Widget { }
  3. Same as above 4-8

Expected behavior
obj/Release/net9.0-ios/iOS contains generated files

Context (please complete the following information):

  • OS: MacOS 15.7
  • Docfx version: 2.78.3
  • .NET version: .NET 9.0

Is there a way to pass -bl to the build that docfx does so a binary build log can be produced? Not sure how to debug this without said log.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dotnetGenerate .NET API reference docs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions