Um...
First off, you ask a very, very, very simple question for an extremely complex answer.
First off, how would you have prevented the Dark Ages from not coming? The survival of the Roman Empire?
Next off... let's call it the Middle Ages. The Dark Ages is an aging term, as the Middle Ages weren't actually all that dark.
For example, many modern historians now suggest that the progression of technology did not go backwards or completely stop, but simply progressed at a slower rate.
At the same time, the stretch of international trade increased significantly. Feudualism allowed for population growth, new complex systems of government, and new found wealth.
Really, I'm probably not doing a great job of explaining it, but calling the Middle ages dark is not really a historical thing any more.