The period from 1536 to 1798 was reasonably quiet. The town expanded slightly beyond the city walls near the upper gate. While it was politically powerless, it became an economic center for cheese production and trade. It was the hub for most cheeses that were exported to France. In the 17th century the chapel and the statue erected in her (Notre-Dame-de-Pitié or de Compassion) became a pilgrimage destination. In 1665 the Capuchins took over the property, enlarged and embellished the chapel and built convent buildings on the site of the hospital. The hospital moved to the vicinity of the upper gate. The shrine attracted many pilgrims from the Counties of Burgundy and Savoy. In the 18th century, its popularity began to slowly wane. In 1750-51 a new building replaced the parish church of Saint-Pierre-aux-Liens, which had become too small. In 1763–1768, the bailiff's quarters and the audience hall in the castle were expanded and renovated.