Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Unable to load DLL 'FastTreeNative' when targeting net472 #7552

@lipchev

Description

@lipchev

System Information:

  • OS & Version: [Windows 10 (x64)]
  • ML.NET Version: [Microsoft.ML.FastTree v5.0.0]
  • .NET Version: [net472]

Describe the bug
The FastTreeNative.dll isn't being deployed to the output directory, causing a runtime exception when attempting to train a model.

Unable to load DLL 'FastTreeNative'

To Reproduce
Steps to reproduce the behavior:

  1. Create a project targeting the NET Framework (e.g. net472)
  2. Include the ML.NET & FastTree packages (same behavior with either v4 or v5)
  3. Create a simple training pipeline
  4. Run the project and observe a runtime exception

Expected behavior
The appropriate FastTreeNative.dll is included in the output directory and no exception is thrown.

Additional context
The same code, targeting net10.0 deploys the FastTreeNative.dll in the runtimes\win-x86\native and runtimes\win-x64\native folders. If I manually copy the file from the net10.0 build to the bin\Debug directory of the framework build, it works as expected.

Possibly related to #5308.

Metadata

Metadata

Assignees

No one assigned

    Labels

    untriagedNew issue has not been triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions