Built to a design by Francesco Maria Richini.,[3] the foundation stone of the new basilica was laid on 26 May 1609, but the first service was not held until 1614, when the work was not yet completed, on the occasion of the patron saint's feast day.
From the registers of the Fabrica di S. Giovanni and on the basis of the chronicles of the curate Pietro Antonio Crespi Castoldi, we know that from 1609 to 1613 the bones of the old cemetery near the church bell tower were removed and the perimeter foundations were laid, followed by the construction of the chapel dedicated to Sant'Ambrogio.
The second was military: the construction of the bell tower was, in fact, partly financed by the municipality, as it could have been used as a watchtower for defensive purposes since the church was located not far from the centre of the rectangle of fortifications.
Outside the church, on the right-hand side, is the "mortorio", a small temple by an unknown author, painted between 6 September 1689 and 2 November 1692,[8] which was meant to remind passers-by of the mystery of death by displaying skulls, still visible today from Via Milano.
Paintings were also visible outside, works by the brothers Ambrogio Gelli, Francesco and Biagio Bellotti (the latter grandfather of the Bustocco painter of the same name), depicting the ages of man, the various aspects of death, virtues, purgatory and weeping angels, removed in 1975 and transferred to the Church of San Gregorio Magno in Camposanto.