"The Two Gentlemen of Verona" which is believed to have been written in the early 1590s is considered by Shakespearean scholars to be Shakespeare's first comedy, in fact his first play for the stage. However, it was not published till 1623 in the first folio.
"The Tempest" is considered by Shakespearean scholars to have been his last comedy. It was most probably written between 1610-1611. It was first performed most probably on the stage in 1611. It was published however, only in 1623 in the first folio.