Hi,
We have a InfoPath 2007 form with code that is published in SharePoint 2007. We recently got upgraded to Office 2013 and SharePoint 2013.
I am trying to migrate the InfoPath form from SharePoint 2007 to 2013. I have the working code and manifest.xsf file.
So these are the steps I did.
Open the .csproj file via Visual Studio 2008
Go to project’s properties and update the Settings value for Web Service URL to point to our SharePoint 2013 site. Save.
Open manifest.xsf file with XML editor and look
for line that contain “.csproj”. Update the line so that the .csproj file is
pointing to the latest/correct path
Open the manifest.xsf and the form should open
in design mode.
Updated all InfoPath form datasources to point
to the new SharePoint 2013 site.
I tried building the solution but I got an error from "SGEN" file. I tried creating a new solution and added back the existing project files, references ..etc and I was able to successfully build the solution
When I tried publishing the form to our SharePoint 2013 document library, I keep on getting this error message when trying to open a new form from the document library.
"The submit section (xsf:submit element) in
the form definition (.xsf) file contains an error. The form definition (.xsf) file specifies
that submit functionality will be defined in code, but the code does not define
a submit event handler."

I also tried removing the entire code from the form but I still got the same exact error when I re-published it and tried opening a new form from the library.
I tried the following steps/suggestions
but I still get the same error message.
http://www.dotnetfunda.com/articles/show/2829/migrating-infopath-2007-form-to-2013-forms
Did this https://blogs.perficient.com/microsoft/2013/03/infopath-and-sharepoint-2013-upgrading-your-forms/
and still get the same exact error.
Any help would be greatly approceiated. Thanks in advance.