Is any menu of the dialog defined?

I had the error when a dialog with menu was defined but corresponding menu wasn't added to the resources of the project.