The issue with this is that somehow the code behind the InfoPath page gets corrupted. The fix can be one of two things.
1) Remove the code behind page if you haven't actually coded anything. This takes the form back to the original functionality and should fix the problem. (Assuming you haven't created any code behind buttons or anything else. OnLoad, etc.)
2) Go into the Code Editor (Alt+Shift+F12), in the upper right-hand pane (Project Explorer) right-click on the project name and select Properties, left-click on the Signing tab and un-check the "sign the assembly" option. This should allow you to build and publish the form. If signing is required on the form; you will be able to re-check the box and assign a new password and then build and publish.
Jeffrey J Vojtko