Quantcast
Viewing all articles
Browse latest Browse all 655

New Post: On Windows Phone

For the benefit of others.  This should be included in the docs somehow.

I used NuGet to install Html Agility Pack into my Windows Phone project and it added HtmlAgilityPack.dll as a reference. However compiling gave the following error:

error CS0012: The type 'System.Xml.XPath.IXPathNavigable' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Xml.XPath, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. 

There is no such assembly provided for Windows Phone. However one can add a Silverlight version of that assembly, e.g. from

c:\Program Files (x86)\Microsoft SDKs\Silverlight\v4.0\Libraries\Client\System.Xml.XPath.dll

Adding the reference gives a warning, see below.  There is no error at runtime however and the code works are expected.  (Presumably an app using it passes certification but I haven't published using this.)

Image may be NSFW.
Clik here to view.

We can see that it is referenced this way in the HapPhone.7.1.csproj project:

<Reference Include="System.Xml.XPath">
   <HintPath>..\..\..\..\Program Files (x86)\Microsoft SDKs\Silverlight\v4.0\Libraries\Client\System.Xml.XPath.dll</HintPath>
</Reference>


Viewing all articles
Browse latest Browse all 655

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>