LokiMidgard / PartialMixins

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

Mixin attribute not found?! #13

Closed znakeeye closed 2 years ago

znakeeye commented 2 years ago

Created a new WPF project, targeting .NET Framework 4.8 and installed the nuget package. Then followed the steps described in the docs.

using Prism.Mvvm;
using System;
using Mixin;

namespace WpfApp3;

[Mixin(typeof(Identity))]
public partial class MainViewModel : BindableBase
{
}

class Identity
{
    public Guid Id { get; set; } = Guid.NewGuid();
}

The error

Build started...
1>------ Build started: Project: WpfApp3, Configuration: Debug Any CPU ------
1>C:\src\WpfApp3\WpfApp3\MainViewModel.cs(3,7,3,12): error CS0246: The type or namespace name 'Mixin' could not be found (are you missing a using directive or an assembly reference?)
1>C:\src\WpfApp3\WpfApp3\MainViewModel.cs(7,2,7,7): error CS0246: The type or namespace name 'MixinAttribute' could not be found (are you missing a using directive or an assembly reference?)
1>C:\src\WpfApp3\WpfApp3\MainViewModel.cs(7,2,7,7): error CS0246: The type or namespace name 'Mixin' could not be found (are you missing a using directive or an assembly reference?)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

The .csproj contains this:

<ItemGroup>
    <PackageReference Include="PartialMixin">
      <Version>1.0.54</Version>
    </PackageReference>

Ideas?