Severity Code Description Project File Line Suppression State
Error The "LinkAssemblies" task failed unexpectedly.
Mono.Linker.MarkException: Error processing method: 'System.DateTimeOffset YoutubeExplode.Internal.Parsers.VideoWatchPageParser::ParseUploadDate()' in assembly: 'YoutubeExplode.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve AngleSharp.Dom.Html.IHtmlDocument
at Mono.Linker.Steps.MarkStep.HandleUnresolvedType(TypeReference reference)
at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
at MonoDroid.Tuner.MonoDroidMarkStep.MarkType(TypeReference reference)
at Mono.Linker.Steps.MarkStep.MarkField(FieldReference reference)
at Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction)
at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)
at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
at Mono.Linker.Steps.MarkStep.ProcessQueue()
--- End of inner exception stack trace ---
at Mono.Linker.Steps.MarkStep.ProcessQueue()
at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()
at Mono.Linker.Steps.MarkStep.Process()
at MonoDroid.Tuner.MonoDroidMarkStep.Process(LinkContext context)
at Mono.Linker.Pipeline.Process(LinkContext context)
at MonoDroid.Tuner.Linker.Process(LinkerOptions options, ILogger logger, LinkContext& context)
at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
at Xamarin.Android.Tasks.LinkAssemblies.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.
Hi, can you please let me know how I can fix this issue, this happened after i updated to the latest verison.
SQLite-net;SQLitePCLRaw.batteries_v2;SQLitePCLRaw.core;AngleSharp;YoutubeExplode;
this is Skip Link Assemblies Text Field
Seems like it can't find AngleSharp? Do you have it there?
Please have a look to this picture.
https://i.ibb.co/cN65dGS/Unbenannt.png
I do have a reference to AngleSharp. To help you with the issue, the problem is when I use LINK ASSEMBLIES only.
This happened just after the update.
I don't know what Link Assemblies only means
That is an Option On xamarin android where you can remove the code from the library which one is not used anywhere.
Linking is failing right now after the update, I try to add the Namespaces on the Skip Options but it does not work.
Maybe you changed the Namespace or something from AngleSharp?
Switched back to 4.6.2 and everything compiles just fine. I googled and the answer is that somehow some libraries version does not match when I update to the latest version 4.6.3.
I try to skip Linking your Assemblies but that does not work ...
Without linking, the apk file will be 40-50 MB, and with Linking it will be around 15MB.
Getting similar on this
var id = YoutubeClient.ParseVideoId(youtubeUrl);
Exception Could not load type 'AngleSharp.Parser.Html.HtmlParser' from assembly 'AngleSharp, Version=0.10.1.0
Stack trace: YoutubeExplode.Internal.Parsers.VideoWatchPageParser.Initialize(String raw)
at YoutubeExplode.YoutubeClient.
--- End of stack trace from previous location where exception was thrown ---
On latest version of everything....
YoutubeExplode uses AngleSharp v0.9.9.1. did you update it manually?
@Tyrrrz
AngleSharp has updated to 0.10 this month with some breaking changes.
For example, HtmlParser class now in AngleSharp.Html.Parser.HtmlParser namespace, not in AngleSharp.Parser.Html.HtmlParser. And it support only net standard 1.3+ now.
I faced similar problem, when tried to use new AngleSharp with YoutubeExplode.
Damn, this is rather unfortunate seeing as YoutubeExplode targets .net standard 1.1 at minimum. If we stay in v0.9, it might introduce issues for packages that also use AngleSharp as a dependency.
@Tyrrrz
I have write issue https://github.com/AngleSharp/AngleSharp/issues/738, when 0.10.0 has released and targets netstandard2.0.
I think, YoutubeExplode can target NS1.1+ with old AngleSharp and NS1.3+ with new AngleSharp with separating in csproj with conditions and #if directive in code. It's dirty, but should work.
I think this is a great idea @tirraon.
I'll see what I can do. The problem is that I will also have to create a .net46 target because I want to avoid large dependency graphs of .net standard.
To be honest, we can actually drop 1.1 and target 1.3, we will lose Windows Phone 8.1 and .NET 4.5 support however, but I'm not sure how big of a deal is it.
I just released a version that pins AngleSharp to last 0.9.x version until I find a solution going forward
Does anyone know a good, super lightweight HTML parser that supports CSS selectors? AngleSharp seems to solve a lot more than we need and it might be a good idea to drop it for something simpler.
So instead of using AngleSharp, I just wrote my own HTML parser, so far it's in a very raw state, but it's functional enough to replace AngleSharp for our use cases.
Most helpful comment
I just released a version that pins AngleSharp to last 0.9.x version until I find a solution going forward