We are developing an infopath form which is pretty big. We have around 38 views and the code behind is around 3500 lines of code. When ever I try to open the code behind I get an error, "Infopath has encountered an error. The operation failed". I tried to remove the code behind and add it back. Still the same thing.