-
Hello! I've written a simple source generator for doing DI service registration by using attributes. I am however having an issue where I can't deploy to iOS (hot reload) unless I add this package reference in my app's csproj file: To me that is wrong, but unless I do it I get this error:
I don't have this issue using your source generator nor any other source generator, this is only an issue with my own source generator project that my app is referencing. I am referencing my SG project like this: I am not using the attribute I tried creating a separate project that only contained the attributes, however, the source generator stopped working then for some reason. So yeah, I would really like some guide/help as to how to create a SG for MAUI that works, since the Community Toolkit has one and several others work. Is this perhaps an issue with Hot reload and that my SG projected is referenced instead of having it as a NuGet package? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 12 replies
-
@Cybrosys can you push your code to github and share the link? That will be easier to find what's going on. Did you add the And I recommend you to try setting the |
Beta Was this translation helpful? Give feedback.
-
Closed as Answered |
Beta Was this translation helpful? Give feedback.
I used this approach for SG with attributes and it works. You can see here
#1321
look for
src/CommunityToolkit.Maui/CommunityToolkit.Maui.csproj
I'll be able to look your code sometime next week