Build WindowsCommunityToolkit fails with 'An item with the same key...' #4564
Replies: 4 comments 5 replies
-
We cannot see your code, but I get similar from Mvvm source generators when I incorrectly use upper case names for ObservableProperty variables. The message means what it says. The same variable is being defined in different parts of the partial class files. Ignore my comment if not using mvvm source generators, but do refine your question. |
Beta Was this translation helpful? Give feedback.
-
All I did was clone the repo, open it and hit build. If I ignore the message the build then completes apparently successfully. However attempting to run the SampleApp then has the same issue and the app doesn't start. |
Beta Was this translation helpful? Give feedback.
-
build.bat completed successfully - but didn't build the samples. Building the samples in VS gave me the same error, then apparently succeeded, but produced no output in the bin/x86/.. folder. CSC : warning CS8785: Generator 'IMessengerRegisterAllGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'ArgumentException' with message 'The hintName 'UITests.App.MainTestHost.cs' of the added source file must be unique within a generator. |
Beta Was this translation helpful? Give feedback.
-
Yes same result with x86. I do get these warnings:
I'll try building on a different machine. It's probably my setup. May take me a day or two. |
Beta Was this translation helpful? Give feedback.
-
My copy of the repo is at 20/05/2022 main branch.
When I try to build (VS 2022 17.2.1) I get
Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions