This error generally occurs when no items have been selected in Project Explorer or more than one item has been selected.
To correct this error