You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using .net communityToolkit maui for two projects in a solution, one main executable and one shared library, the following error occurs
MainTest-master\MainTest-master\MainTest\CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\TimePickerTextColorTo.g.shared.cs(41,89,41,124): warning CS0436: The type 'ColorAnimationExtensions_TimePicker' in 'CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\TimePickerTextColorTo.g.shared.cs' conflicts with the imported type 'ColorAnimationExtensions_TimePicker' in 'MainTest.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\TimePickerTextColorTo.g.shared.cs'.
Expected Behavior
No build errors should occur
Steps To Reproduce
I create two maui project, one main that can run, and one with shared code
Reference the shared project from the main project
Then i add the community toolkit to the shared code projet
Then build the main project, build warnings/errors occur
See below:
C:\Users\xxx\source\repos\MainTest\MainTest\CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\TimePickerTextColorTo.g.shared.cs(41,89,41,124): warning CS0436: The type 'ColorAnimationExtensions_TimePicker' in 'CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\TimePickerTextColorTo.g.shared.cs' conflicts with the imported type 'ColorAnimationExtensions_TimePicker' in 'MainTest.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\TimePickerTextColorTo.g.shared.cs'.
2>C:\Users\xxx\source\repos\MainTest\MainTest\CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\EditorTextColorTo.g.shared.cs(41,89,41,120): warning CS0436: The type 'ColorAnimationExtensions_Editor' in 'CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\EditorTextColorTo.g.shared.cs' conflicts with the imported type 'ColorAnimationExtensions_Editor' in 'MainTest.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\EditorTextColorTo.g.shared.cs'.
2>C:\Users\xxx\source\repos\MainTest\MainTest\CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\PickerTextColorTo.g.shared.cs(41,89,41,120): warning CS0436: The type 'ColorAnimationExtensions_Picker' in 'CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\PickerTextColorTo.g.shared.cs' conflicts with the imported type 'ColorAnimationExtensions_Picker' in 'MainTest.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\PickerTextColorTo.g.shared.cs'.
2>C:\Users\xxx\source\repos\MainTest\MainTest\CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\SearchBarTextColorTo.g.shared.cs(41,89,41,123): warning CS0436: The type 'ColorAnimationExtensions_SearchBar' in 'CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\SearchBarTextColorTo.g.shared.cs' conflicts with the imported type 'ColorAnimationExtensions_SearchBar' in 'MainTest.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\SearchBarTextColorTo.g.shared.cs'.
2>C:\Users\xxx\source\repos\MainTest\MainTest\CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\DatePickerTextColorTo.g.shared.cs(41,89,41,124): warning CS0436: The type 'ColorAnimationExtensions_DatePicker' in 'CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\DatePickerTextColorTo.g.shared.cs' conflicts with the imported type 'ColorAnimationExtensions_DatePicker' in 'MainTest.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\DatePickerTextColorTo.g.shared.cs'.
2>C:\Users\xxx\source\repos\MainTest\MainTest\CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\ButtonTextColorTo.g.shared.cs(41,89,41,120): warning CS0436: The type 'ColorAnimationExtensions_Button' in 'CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\ButtonTextColorTo.g.shared.cs' conflicts with the imported type 'ColorAnimationExtensions_Button' in 'MainTest.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\ButtonTextColorTo.g.shared.cs'.
2>C:\Users\xxx\source\repos\MainTest\MainTest\CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\RadioButtonTextColorTo.g.shared.cs(41,89,41,125): warning CS0436: The type 'ColorAnimationExtensions_RadioButton' in 'CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\RadioButtonTextColorTo.g.shared.cs' conflicts with the imported type 'ColorAnimationExtensions_RadioButton' in 'MainTest.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\RadioButtonTextColorTo.g.shared.cs'.
2>C:\Users\xxx\source\repos\MainTest\MainTest\CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\EntryTextColorTo.g.shared.cs(41,89,41,119): warning CS0436: The type 'ColorAnimationExtensions_Entry' in 'CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\EntryTextColorTo.g.shared.cs' conflicts with the imported type 'ColorAnimationExtensions_Entry' in 'MainTest.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\EntryTextColorTo.g.shared.cs'.
2>C:\Users\xxx\source\repos\MainTest\MainTest\CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\LabelTextColorTo.g.shared.cs(41,89,41,119): warning CS0436: The type 'ColorAnimationExtensions_Label' in 'CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\LabelTextColorTo.g.shared.cs' conflicts with the imported type 'ColorAnimationExtensions_Label' in 'MainTest.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\LabelTextColorTo.g.shared.cs'.
Long answer: We have a high-priority bug that will be fixed within the next few days. Once the fix for #785 has been merged we will publish a new Release 👍
Is there an existing issue for this?
Current Behavior
When using .net communityToolkit maui for two projects in a solution, one main executable and one shared library, the following error occurs
MainTest-master\MainTest-master\MainTest\CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\TimePickerTextColorTo.g.shared.cs(41,89,41,124): warning CS0436: The type 'ColorAnimationExtensions_TimePicker' in 'CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\TimePickerTextColorTo.g.shared.cs' conflicts with the imported type 'ColorAnimationExtensions_TimePicker' in 'MainTest.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\TimePickerTextColorTo.g.shared.cs'.
Expected Behavior
No build errors should occur
Steps To Reproduce
See below:
Link to public reproduction project repository
https://github.com/norfus/MainTest
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: