This project has moved. For the latest updates, please go here.

Wrapper is providing type 'NotifyCollectionChangedEventArgs'

Topics: Errors
Feb 18, 2016 at 7:30 AM
Hello,

first of course thanks for your effort.

I'm using your wrapper inside of a custom .NET 2.0 library. When updating the wrapper dll from 2.3.4 to 2.5.14 (both .NET 2.0 versions) and using the custom .NET 2.0 library in a .NET 4.0 Client WPF project, which is using the class System.Collections.Specialized.NotifyCollectionChangedEventArgs, I get an conflict that the type 'NotifyCollectionChangedEventArgs' exists both in your wrapper and .NET.

Error CS0433 The type 'NotifyCollectionChangedEventArgs' exists in both 'Microsoft.Win32.TaskScheduler, Version=2.5.14.0, Culture=neutral, PublicKeyToken=0d013ddd5178a2ae' and 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

I'm not sure if this is a configuration problem on my side or an unwanted behaviour of the wrapper. Maybe someone dealed with that issue as well and have a simple solution (other than switching my custom library to .NET 4.0).

Crayjin
Coordinator
Feb 18, 2016 at 6:29 PM
.NET 2.0 does not natively include NotifyCollectionChangedEventArgs. To allow for this library to have a consistent experience across .NET versions, I reverse engineered that class and included it in the 2.0 build only. My recommendation would be to deploy the .NET 4.0 build of this library when deploying with your 4.0 WPF project.
Marked as answer by dahall on 2/18/2016 at 11:29 AM
Feb 23, 2016 at 8:22 AM
Edited Feb 23, 2016 at 8:22 AM
Okay, thank you for your advice.