This project shows how you can use XDT directly from a .NET project.