Search code examples
xamarinpostsharp

Postsharp NotifyPropertyChanged on xamarin


I want to try PostSharp with xamarin. I install new PostSharp 4.1. Then I was added to project and I want add NotifyPropertyChanged aspect, but I do not have a suggestion in Visual Studio. So I try install PostSharp patterns model from nuget, but thats fail, whats I doing bad?

 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.

Solution

  • You need to use PostSharp.Patterns.Model package instead of PostSharp.Patterns.Model.Controls. The latter is supported only on .NET and contains Undo-Redo WPF controls.