You need to add the package System.Xml.XPath.XDocument 4.0.1 . This package provides extension methods that add System.Xml.XPath support for the System.Xml.XDocument package.
Run the command below in the package manager console.
PM> Install-Package System.Xml.XPath.XDocument -Version 4.0.1
You can also install it from the NuGet package manager with NuGet 2.12 version NuGet 2.12 or higher.
source share