Xamarin 中的 Postsharp INotifyPropertyChanged

Postsharp NotifyPropertyChanged on xamarin

我想尝试使用 Xamarin 的 PostSharp。我安装了新的 PostSharp 4.1。然后我被添加到项目中,我想添加 NotifyPropertyChanged 方面,但我在 Visual Studio 中没有建议。所以我尝试从 nuget 安装 PostSharp 模式模型,但是失败了,我做错了什么?

 Could not install package 'PostSharp.Patterns.Model.Controls 4.1.10'. You are trying to install this package into a project that targets 'portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

您需要使用 PostSharp.Patterns.Model 包而不是 PostSharp.Patterns.Model.Controls。后者仅在 .NET 上受支持并且包含撤消-重做 WPF 控件。