웹 페이지에서 무언가를 가져 와서 사용자에게 보여주는 앱을 만들고 싶습니다. 이 일을하기 위해서, 나는 HtmlAgilityPack을 사용했다. 프로젝트 (NuGet의 1.4.6.0 버전)에 대한 참조를 추가했으며 몇 년 전에 사용자가 다른 질문에 게시 한 코드를 사용했습니다. HtmlAgilityPack을 사용하여 조립 오류가 발생했습니다.
그래서 나는 다음과 같은 DLL을 사용하여 참조를 추가하려고 :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'.
c:\Program Files (x86)\Microsoft SDKs\Silverlight\v5.0\Libraries\Client\System.Xml.XPath.dll
을하지만 난 얻을이 시간은 다음과
HtmlAgilityPack.HtmlDocument htmlDoc = new HtmlAgilityPack.HtmlDocument();
// There are various options, set as needed
htmlDoc.OptionFixNestedTags = true;
// filePath is a path to a file containing the html
htmlDoc.Load(filePath);
if (htmlDoc.ParseErrors != null && htmlDoc.ParseErrors.Count() > 0)
{
// Handle any parse errors as required
}
else
{
if (htmlDoc.DocumentNode != null)
{
HtmlAgilityPack.HtmlNode bodyNode = htmlDoc.DocumentNode.SelectSingleNode("//body");
if (bodyNode != null)
{
// Do something with bodyNode
}
}
}
내 문제는 내가 다음과 같은 오류를 얻을 수 있다는 것입니다 오류 (이탈리아어 오류가 발생하여 번역되었으므로 올바른 번역이 아닐 수 있습니다.)
It is not possible to add a reference to an assembly to the project that is not compatible or of an above version
무엇을 할 수 있습니까?
Windows Phone 8.1 실버 라이트 앱입니까, 아니면 Windows Phone 스토어 앱입니까? – har07