Skip to content

[Bug]: error MSB4175: The task factory "RoslynCodeTaskFactory" could not be loaded from the assembly "/usr/local/share/dotnet/sdk/8.0.203/Microsoft.Build.Tasks.Core.dll". #9878

@phillippschmedt

Description

@phillippschmedt

Issue Description

error MSB4175: The task factory "RoslynCodeTaskFactory" could not be loaded from the assembly "/usr/local/share/dotnet/sdk/8.0.203/Microsoft.Build.Tasks.Core.dll". Could not load file or assembly 'System.CodeDom, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. Could not find or load a specific file. (0x80131621)

when trying to run a RoslynCodeTaskFactory task in .NET 8 and VS for Mac 17.6.10.

Steps to Reproduce

Run a RoslynCodeTaskFactory task.

Expected Behavior

Task runs fine.

Actual Behavior

Throws error:
error MSB4175: The task factory "RoslynCodeTaskFactory" could not be loaded from the assembly "/usr/local/share/dotnet/sdk/8.0.203/Microsoft.Build.Tasks.Core.dll". Could not load file or assembly 'System.CodeDom, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. Could not find or load a specific file. (0x80131621)

Analysis

Was mentioned here:
#9471
and
#9732

Versions & Configurations

dotNET SDK: 8.0.203
VS for Mac: 17.6.10

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions