0

I am trying to use dependency injection for my converter in the Xaml code as described at: [https://github.com/PrismLibrary/Prism/releases/tag/7.1.0-pre1][1]

This requires the use of Prism.Forms

xmlns:ioc="clr-namespace:Prism.Ioc;assembly=Prism.Forms"

this though causes a conflict

Error   CS0433  The type 'IDialogService' exists in both 
'Prism.Forms, Version=7.2.0.1422, Culture=neutral, PublicKeyToken=null' and 
'Prism.Wpf, Version=7.2.0.1422, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59'
  • Isn't Prism.Forms for Xamarin forms app only?
  • Why is Prism.Ioc missing from Prism.Wpf?
  • Will the above conflict cause problems?
  • Maybe I am missing something?

Thanks for your attention. Peter

Peter S.
  • 144
  • 1
  • 7
  • `Prism.Forms` is the platform specific package for Xamarin.Forms just like `Prism.Wpf` is for WPF. – mm8 Dec 08 '20 at 16:19
  • Right, so we would still need Prism.Ioc in the Wpf package too :( – Peter S. Dec 08 '20 at 17:29
  • What exactly are you trying to do, i.e. what is your issue? – mm8 Dec 09 '20 at 07:53
  • I have to inject a service into one of my converters. But converters are instantiated by the Xaml framework => cannot inject a service. Same issue as: https://stackoverflow.com/questions/49892472/how-to-resolve-a-dependency-in-ivalueconverter-in-xamarin-forms-using-prism-dryi Seemingly it has been solved for Xamarin but not for Wpf! :( – Peter S. Dec 09 '20 at 17:34

0 Answers0