Search code examples
c#visual-studio-2010runtime-errorvisual-studio-debugging

Specified cast is not valid when run from debug folder in C#


i have an application which gives me error saying Specified cast is not valid when tried to run .exe from bin/Debug folder. I have no clue why it is happening since i run the app from visual studio 2010, it runs smooth. Any clues?

enter image description here


Solution

  • Found the solution. As per the comment from Damien_The_Unbeliever, the problem was with setting up the AutoCompleteCustomSource for the textboxes. When i removed the Autocomplete code, the app started running smoothly.