Microsoft.ML porting away from .netcore to .net frameworks 4.7.2

162 Views Asked by At

After moving the working code for the githubticketclassifier, a decision tree using the microsoft.ml lightGbm decision tree trainer I had great results and made my own dataset. I then converted it to .net 4.7.2 frameworks in a console environment and it still worked ok. just had some closing of the console I found could be avoided using messagbox popups. Anyway next I tried calling from the autodesk.revit api to send some features and it couldnt finish the model it would create the dataset from the tsv files, however then it would throw an exception. So nothing worked I tried adding it directly to my class that gets called by the revit api and i recieved the following error as soon a i invoke the main method.

Could not load file or assembly 'System.Memory, Version=4.0.1.0, Culture=neutral,

PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies.

The system cannot find the file specified.

This is installed and is the latest version, 4.5.4. I looked at the app.config bindings and i see this...

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  <dependentAssembly>
    <assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-4.0.1.1" newVersion="4.0.1.1" />
  </dependentAssembly>

i tried changing to the newer version and it made no difference.

1

There are 1 best solutions below

1
On

I tried various solutions dealing with the Nuget package manager and was unable to succeed, there may be limitations with the Revit API, I was never able to confirm that. What I eventually did was to create a standalone console .exe in .net frameworks 4.7.2 I then called this with arguments and returned the output from the console. This performed equivalent of a linked or embedded DLL return method.