dotnet / dotnet/docfx

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

Open
#10,840 2 comments 0 reactions 0 assignees View on GitHub
dotnet
Dominant language
C#
Stars
4.4k
Forks
890
Avg merge
2h 11m
Merged PRs (30d)
10

Description

**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 `true`
3. using sharpie, generate and including binding files for a framework
* ``
* ``
4. init docfx project referring to maui library project with all defaults
5. run docfx to build the project
6. observe the binding files are never generated in obj/Release/net9.0-ios/iOS for example
7. build the project manually in release
8. 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.