The longest ruling European dynasty
This thread is a derivative of an ongoing thread; I prefer to post this information in a new one, given some imprecision on the inclusion criteria of the original, and also to avoid any further contamination of that thread.
Please note that using conventional royal genealogical criteria, the name transmission of the noble Houses is patrilineal; i.e. female monarchs end the transmission line.
No doubt the longest ongoing ruling royal house of Europe (and maybe of all times, given the low accuracy of the data from former purportedly longer European dynasties) is the Capetian dynasty in its wider sense, through its branch the Bourbon House, more specifically the (Spanish) Bourbon-Anjou and the Bourbon-Parma families.
The Capetian dynasty is itself a continuation of the Frankish noble Robertian family; their first more-or-less certain known ancestor would be Robert II, Duke of Hesbaye under Charlemagne (circa 800).
(Some dubious pedigrees may go back as far as Chrodobert, an Aleman Dux of the VII century).
Five generations later, the first Capetian was of course the eponymous Hugh Capet (died 996), often considered as the first truly French king.
The House of Bourbon was derived in 1268 from the ninth Capetian King of France, (Saint) Louis IX, via his sixth son Robert, Count of Clermont.
Virtually all the later Bourbon monarchs came from the junior branch of Bourbon-La Marche (later Vend˘me), derived in 1351 from the Count James I, fourth son of the Duke Louis I, the eldest son of the Robert of Clermont above.
Eight generations later, his descendant Henry (IV) became king of France in 1589.
The Bourbon-Anjou branch was derived four generations later (in 1700) from Philip V of Spain (a second son); the incumbent Spanish king Juan Carlos I is his descendant after eight generations.
The Bourbon-Parma branch was derived from the Duke Philip of Parma, the third son of Philip V of Spain; the incumbent Grand Duke of Luxembourg Henri I is his descendant after eight generations (even if his house was renamed Nassau-Weilburg since 1912).
Ergo, after some twelve centuries both Henri I of Luxembourg and Felipe, the Prince of Asturias (Spanish heir apparent) are direct male descendants by thirty-two generations from Hugh Capet (therefore, thirty-seven generations from Robert of Hesbaye).