This project has moved and is read-only. For the latest updates, please go here.
1
Vote

Not compiling with .NET 2.0

description

Hi,

I've added the .NET 2.0 DLL in my test project with .NET 4.5.2. It works.
using HtmlAgilityPack;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ValideHtml
{
    class Program
    {
        static void Main(string[] args)
        {
            string html = "<span>Hello world</sspan>";

            HtmlDocument doc = new HtmlDocument();
            doc.LoadHtml(html);

            if (doc.ParseErrors.Count() > 0)
            {
                //Invalid HTML
                Console.WriteLine("Errors");
            }
        }
    }
}
After, I downgraded my project to .NET 2.0, the project don't compile because it requires System.Linq for "if (doc.ParseErrors.Count() > 0)"

Vincent

comments