Good afternoon, evening, morning, night.
There was a task to parse certain things from the site. But now is not about that.
Language : C #.
IDE : VS 2012
Parsing tools : CsQuery or Angle Sharp. HtmlAgilityPack would not like to use, because selectors are more pleasant.
I load all NuGet'om.
Angle Sharp
Trying to use AngleSharp. When creating any object crashes
System.TypeInitializationException не обработано HResult=-2146233036 Message=Инициализатор типа "AngleSharp.Configuration" выдал исключение. Source=AngleSharp TypeName=AngleSharp.Configuration StackTrace: в AngleSharp.Configuration.get_Default() //вызовы моих функций в System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) в System.AppDomain.nExecuteAssembly(RuntimeAssembly assembly, String[] args) в System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) в Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() в System.Threading.ThreadHelper.ThreadStart_Context(Object state) в System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) в System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) в System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) в System.Threading.ThreadHelper.ThreadStart() InnerException: System.TypeInitializationException HResult=-2146233036 Message=Инициализатор типа "AngleSharp.Factory" выдал исключение. Source=AngleSharp TypeName=AngleSharp.Factory StackTrace: в AngleSharp.Configuration..cctor() InnerException: System.AccessViolationException HResult=-2147467261 Message=Попытка чтения или записи в защищенную память. Это часто свидетельствует о том, что другая память повреждена. InnerException: After analyzing, we understand that the error takes place then System.AccessViolationException (the last lines), and AngleSharp responds to this and gives its own. PS In git they did not find such complaints.
Csquery
Same, but System.AccessViolationException crashes.
Conclusion
The problem is on my side. But how to fix it, I did not find.
Question:
How to fix and what information is needed?
PS The most interesting thing: when you try to use HtmlAgiglityPack, there are no such problems (tobish the problem with these packages). Yuzayu also xNet, normal flight.