I have a big and bloated software and I want to add a new GUI element to it. The GUI element was written using XAML and WPF. I created the UI element in a separate assembly,
I finally found a reason for this bug : apparently, in some cases referencing a .exe file does not work properly. Some methods and classes loads OK but some fails. In another project, referencing this .exe file cause no problem.
Switching to the .dll format solved all linking problems. I think this is a bug in the CLR.