military action at the castle took place during the second Jacobite rising of 1745. The Jacobite army, under Charles Edward Stuart ("Bonnie Prince Charlie"), captured Edinburgh without a fight in September 1745, but the castle remained in the hands of its ageing Deputy Governor, General George Preston, who refused to surrender. After their victory over the government army at Prestonpans on 21 September, the Jacobites attempted to blockade the castle. Preston's response was to bombard Jacobite positions within the town. After several buildings had been demolished and four people killed, Charles called off the blockade. The Jacobites themselves had no heavy guns with which to respond, and by November they had marched into England, leaving Edinburgh to the castle garrison. Over the next century, the castle vaults were used to hold prisoners of war during several conflicts, including the Seven Years' War (1756–1763), the American War of Independence (1775–1783) and the Napoleonic Wars (1803–1815). During this time, several new buildings were erected within the castle, including powder magazines, stores, the Governor's House (1742), and the New Barracks (1796–1799). 19th century to the present A mass prison break in 1811, in which 49 prisoners of war escaped via a hole in the south wall, persuaded the authorities that the castle vaults were no longer suitable as a prison. This use ceased in 1814 and the castle began gradually to assume a different role as a national monument. In 1818, Sir Walter Scott was given permission to search the castle for the Crown of Scotland, believed lost after the union of Scotland and England in 1707. Breaking into a sealed room, now known as the Crown Room, and unlocking a chest within, he rediscovered the Honours of Scotland, which were then put on public display with an entry charge of one shilling. In 1822, King George IV made a visit to Edinburgh, becoming the first reigning monarch to visit the castle since Charles II in 1651. In 1829, the cannon Mons Meg was returned from the Tower of London, where it had been taken as part of the process of disarming Scotland after "the '45", and the palace began to be opened up to visitors during the 1830s. St Margaret's Chapel was "rediscovered" in 1845, having been used as a store for many years. Works in the 1880s, funded by the Edinburgh publisher William Nelson and carried out by Hippolyte Blanc, saw