Skip to content

Generated .mlnet file solution reference mismatched from actual location #3082

Description

@trailblazercombi

System Information (please complete the following information):

  • Model Builder 2022 Version 18.0.0.2615401 (as shown in Installed Extensions List) or 17.19.2.2511501 (as shown in Installed Extension Details -- see Figure 1)
  • Visual Studio 2026 Version 18.6.1

Describe the bug

  • On which step of the process did you run into an issue: Building .NET project after an MLModel was trained
  • Clear description of the problem: "Could not copy /.mlnet because it does not exist." After MLBuilder finished training, the resuting .mlnet file was saved in <path to project>/<folder where .mbconfig is>/<model name>.mlnet, but the solution references the file in solution's root folder (<path to project>/<model name>.mlnet) instead -- see figures 2 and 3.

To Reproduce
Steps to reproduce the behavior:

  1. Train an ML.NET model using an .mbconfig wizard.
    • You will see a reference to "missing file" appear in solution explorer.
  2. Attempt to build a project.
    • This fails due to the "missing file", well, missing.

Expected behavior
The project builds sucessfully.

Workaround
Moving the file manually to where the solution is expecting the file fixes the issue without any side effects.

Figures
Figure 1 - mismatched extension version:
Image

Figure 2 - project structure with .mbconfig and .mlnet file references:
Image

Figure 3 - actual folder structure on disk and in version control:
Image

Figure 4 - reference in project after the file is moved on disk to the solution's expected place:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions