CommunityToolkit / CommunityToolkit/Maui.NativeLibraryInterop
iOS Build Succeeds but NewBindingMaciOS Namespace Not Found in MainPage.xaml.cs
- Vorherrschende Sprache
- C#
- Sterne
- 249
- Forks
- 48
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
### Description
When building the project, the build succeeds and the framework is generated. However, when trying to use the iOS binding in [MainPage.xaml.cs] I get the following error is `The type or namespace name 'NewBindingMaciOS' could not be found (are you missing a using directive or an assembly reference?)`
### Steps to Reproduce
1. Build the solution, including the NewBinding.MaciOS.Binding project.
2. Build the Maui project.
2.In the Maui project (e.g., MainPage.xaml.cs), add the following code:
```
#if IOS || MACCATALYST
using NewBinding = NewBindingMaciOS.DotnetNewBinding;
#endif
```
```
```
Please advise how to ensure the iOS binding is correctly referenced and available in the Maui project.
### Link to public reproduction project repository
_No response_
### Environment
- OS: Mac 15
- .NET MAUI: 9.0
- Target platforms: IOS, Mac catalyst.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne mit MainPage.xaml.cs und dem im Issue gezeigten bedingten ProjectReference und vergleiche anschließend die Ausgabe des NewBinding.MaciOS.Binding-Projekts mit den MAUI-Ziel-Frameworks. Als erledigt gilt dies, wenn der Namespace NewBindingMaciOS.DotnetNewBinding in den iOS- und Mac Catalyst-Builds aufgelöst wird und das MAUI-Projekt erfolgreich erstellt wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- csharp, ios
- Bereich
- build-system, mobile
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 35/100