I'm not sure this answers your question, but:
Terraria was built using Microsoft's XNA Framework.
Here is a link to a page about the most recent version of Microsoft XNA Game Studio, which includes the engine and developer tools.
https://msdn.microsoft.com/en-us/library/bb200104.aspx
The page includes links to more information and downloads.