Skip to content

System.IO.FileNotFoundException : Could not load file or assembly 'Microsoft.Build.Framework, Version=15.1.0.0 #692

@pascalberger

Description

@pascalberger

I'm referencing MSBuildStructuredLogger 2.1.820 in an assembly which is multi-targeted to net6.0 and net7.0. Unit tests on net.7.0 work fine, but tests on net6.0 fail with the following error:

System.IO.FileNotFoundException : Could not load file or assembly 'Microsoft.Build.Framework, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.

Can be reproduced on the release/3.0 branch of https://github.com/cake-contrib/Cake.Issues.MsBuild/tree/3.0.0

Is there anything I can do to get the tests running under net6.0?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions