We are facing a strange problem. We have a user control written in WPF and we have added a click event handler in the xaml file. On local system it works as expected. But when the build is generated on the server (where we have the code repository), we notice that the resultant build has a bug. The bug is that the click event is generated twice everytime for this control. We are using a OpenFileDialog in the event handler function for browsing images. We noticed that local system build through VS uses CSC.exe for building while on the server we use MSBuild.exe. So we tried building using MSBuild on our local system too. But bug does not reproduce on local system. Building the code on the server system using VS also does not reproduce the bug. Therefore the only way to repro the bug is to generate the automated build on the server. We have tried comparing the IL code of both dlls (buggy and non-buggy). We checked IL code for the event handler function. The IL code is identical.
I do not suspect our code since the bug does not reproduce on our local system under any circumstances. Please let me know if you need any more inputs/details.
Any help will be appreciated.
Thanks, Mishal