LokiMidgard / PartialMixins

Extends C# with Mixins.
MIT License
24 stars 2 forks source link

Unable to compile simple project #12

Closed znakeeye closed 2 years ago

znakeeye commented 2 years ago

Interesting idea, but it breaks immediately.

  1. Create a new WPF project in VS 2022
  2. Choose .NET 6
  3. Install PartialMixin 1.0.54
  4. Build project
Rebuild started...
Restored C:\src\WpfApp2\WpfApp2\WpfApp2.csproj (in 2 ms).
1>------ Rebuild All started: Project: WpfApp2, Configuration: Debug Any CPU ------
1>C:\src\WpfApp2\WpfApp2\PartialMixins\PartialMixins.PartialMixin\MixinAttribute.cs(5,25,5,39): error CS0101: The namespace 'Mixin' already contains a definition for 'MixinAttribute'
1>C:\src\WpfApp2\WpfApp2\PartialMixins\PartialMixins.PartialMixin\MixinAttribute.cs(4,6,4,27): error CS0579: Duplicate 'System.AttributeUsage' attribute
1>C:\src\WpfApp2\WpfApp2\PartialMixins\PartialMixins.PartialMixin\MixinAttribute.cs(7,16,7,30): error CS0111: Type 'MixinAttribute' already defines a member called 'MixinAttribute' with the same parameter types
1>Done building project "WpfApp2_q5rdhvfv_wpftmp.csproj" -- FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
LokiMidgard commented 2 years ago

I did fix #11 But I wasn't able do reproduce your issue yet.

Could you share your Project? Or you can clone this one https://github.com/LokiMidgard/todelete3

LokiMidgard commented 2 years ago

Ok reading your comment on #11 I guess it may also have fixed your issue…

znakeeye commented 2 years ago

Fantastic!! Solved :)

Your library is indeed very useful. Very clever approach to this common limitation of C#.