[BUG] 2 Projects in a solution gives Cannot resolve type "http://schemas.microsoft.com/dotnet/2022/maui/toolkit:SetFocusOnEntryCompletedBehavior".
See original GitHub issueIs there an existing issue for this?
- I have searched the existing issues
Did you read the “Reporting a bug” section on Contributing file?
- I have read the “Reporting a bug” section on Contributing file: https://github.com/CommunityToolkit/Maui/blob/main/CONTRIBUTING.md#reporting-a-bug
Current Behavior
Hi I was really excited to start working with the maui toolkit, and I hope is something I have missed.
If you have a single project all works fine and you dont see the issue , but in a real world project where my main projects reference other Maui class libraries with views and models that are shared you get the error,
Expected Behavior
You should be able to use MCT with many projects and not just a single one. You would not be able to use with Prism Modules or any maui class library that has views in it
Steps To Reproduce
- Create a maui app
- Add .UseMauiCommunityToolkit() to maui project
- add a maui class library
- add a Page to a class library
- Add an entry with a behavior
- build the project and you will see
Error XFC0000 Cannot resolve type “http://schemas.microsoft.com/dotnet/2022/maui/toolkit:SetFocusOnEntryCompletedBehavior”.
Link to public reproduction project repository
https://github.com/gabsamples6/MauiAppSampleMCT
Environment
- .NET MAUI CommunityToolkit: 4.0
- iOS: 16.3
- OS: Windows 11 22H2
- .NET MAUI: 7.0.52
Anything else?
I really appreciate the work you guys do for FREE… If you could easily spot where its going wrong and issue a release that would be fantastic.
We cannot use this library till this is sorted
Many thanks gab
Issue Analytics
- State:
- Created 7 months ago
- Comments:13 (6 by maintainers)
@brminnick I suggest doing anything that can make people feel comfortable about using MCT on libs… Give me some time I’ll open a discussion with some scenarios that could be dangerous, that way we can discuss that and see if makes sense to make MCT lib friendly or not
@pictos We appreciate if you give a work around to make MCT work on libs.