mathnet-numerics
mathnet-numerics copied to clipboard
I want use MKL under AOT publish,But cant
Due to a missing description of the problem, I am guessing here. That you run into the problem, that reflection is used for setting up the providers. You have to specify what should be kept during trimming by AOT.
A solution can be to add a rd.xml
file to your project with the following content:
<?xml version="1.0" encoding="utf-8" ?>
<Directives>
<Application>
<Assembly Name="MathNet.Numerics.Providers.MKL" Dynamic="Required All"/>
</Application>
</Directives>
Then edit your .csproj
file and add
<RdXmlFile Include="rd.xml" />
to any ItemGroup
Thanks!