Error "the application is in break mode"

Hi, my application some times starts without any problem but some times it gives me an error message.
I don't understand how to resolve this. Please see two attached pictures. One with error message and another with my code.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I can get this  error because, if you had a few  reference on assemblies mismatched between x64 and x86.
Is there inner exception? Can you post it here?
Also try to add this code to your App.config :
<configuration> <startup useLegacyV2RuntimeActivationPolicy="true" /> </configuration>

Open in new window

Also try to delete reference on WPFRuleControl and add it again and rebuild your project.
Are you surem that you don`t  forget to add reference on this library?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mastiSoftAuthor Commented:
Hi again Misha ).
It seems to be working with line added to App.config. I'll test a  bit more tomorrow , before I close this question.
mastiSoftAuthor Commented:
Hi again. adding line to App.config didn't help but you told me about mismatching of two users controls . That was the problem I created them with different Framework versions. When I rebuild both to the same version as an application the problem was resolved. Thank you .
Glad to help you!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.