mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-03 21:36:36 +00:00
System.Numerics.Vectors 4.1.3 required ? #577
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @leedavi on GitHub (Nov 26, 2022).
I've ran Markdig under .Net Core without any issue.
However, if I try to run it on a DNN installation (.Net Framework) I get an error. The error is:
Could not load file or assembly 'System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
And indeed, this assembly does not exist. The only version I can find is 4.6
One VERY strange happening is that on the first load and first run, it works? On the second run it fails? I've tried to bind the assembly verison and I've tried other method. All have the same result.
I think it might be MSBUILD. But before I give up on running Markdig in DNN, does anyone have any idea what the problem could be?
Thank you.
@xoofx commented on GitHub (Nov 26, 2022):
How do you reference Markdig in your .NET Framework project? If you are using new SDK style project, the NuGet reference should just work fine, otherwise I suspect that you copied an assembly from Markdig with a wrong .NET profile. See the dependencies for both
.NETFramework 4.5.2and.NETStandard 2.0, they only have dependencies toSystem.Memorybut it doesn't have any dependencies to System.Numerics.Vectors.@leedavi commented on GitHub (Nov 27, 2022):
OK, thx for the reply.
Yes, I thought that. But the version error is defiantly there. DNN now compiles against .Net Framework 4.7.2. Could this be the issue?
Often on the move to the .Net Framework 4.7.2 version we had very odd errors when versions were incorrect. Which makes me think that could be the answer.
Is there a version of Markdig compiled for .Net Framework 4.7.2 ?
@xoofx commented on GitHub (Nov 27, 2022):
Both the 4.5.2 version and netstandard2.0 version should be compatible with it.
If you have a simple repro, please create a GitHub repo and give a link to it, otherwise, I can only suspect an invalid usage somewhere from your side. 🙂
@leedavi commented on GitHub (Nov 27, 2022):
OK, I know MarkDig works, I have it working as a .NetCore solution. This is some kind of version issue between what I'm doing in DNN and what MarkDig expects or wants.
I will not waste your time. I thought you might know off the top of your head. I have a workaround. I'll have a jump into it again if I can find time. I'll put a question if anyone got it working on the DNN MVP forum.
Thank you for your help. I'll let you know if I find a solution.
@glopesdev commented on GitHub (Dec 4, 2022):
@leedavi I also ran into the same issue, updating Markdig from an older version in a .NET 4.7.2 project and I traced the problem down to a dependency from the
System.Memorynuget package.Although Markdig itself does not reference
System.Numerics.Vectors, theSystem.Memorypackage declares a dependency on it for .NET 4.6.1 profile or higher (strangely not for .NET 4.5).It's a bit sad that the dependency on
System.Memorybrings so much baggage to it on legacy .NET projects, as I much prefer having a lean dependency tree. Markdig 18.0 and lower had no dependencies for .NET framework projects. Unfortunately,System.Memoryis a kind of hidden iceberg that brings all kinds of other stuff with it. Would be great to have a build with no dependencies again but at this point it might be easier to just embed Markdig in the project itself.@leedavi commented on GitHub (Dec 5, 2022):
@glopesdev Thank you for letting me know I'm not crazy. :-)
Your confirmation saves me time chasing this. Thank you again. I will look at creating a service to build the html in an external way, Using the code I already have working,
P.S. I agree with you view on dependencies.