It looks like the library you are referencing needs a particular version of XDocument, and the project you are adding the reference to has a newer version. Alternatively the project you are adding the reference to doesn't have a reference to XDocument at all.
In the first scenario, you need to remove the current version of XDocument from the project you are running (the .net 4.5.1 project) and add the correct version (version 4.0.0.0).
If it's the second, you need to add XDocument to this project, and ensure you add the correct version.