What was or is the longest running Lego set?
I'm going to stretch your definition of "set" and say "32x32 green baseplate". You could get set 745-1 in 1978...



...then 840-1 in 1980, then 813-1 in 1986, then 626-1 in 1996:



And since 2015 there's 10700-1, altough it seems that the shade of green is different than the previous iterations:



Since those sets have exactly the same piece count (one) and each piece is functionally the same, I will argue that the green 32x32 baseplate set has been in production since 1978 until today (2019). That's over 40 years.

If you consider these to be different sets because they have different set numbers, then the record goes to 1996's 626-1, with 19 years.