Skip to content

Humanizer.Analyzers.NamespaceMigrationAnalyzer Could not load file or assembly System.Memory, Version=4.0.2.0 #1665

@AnthonySteele-NewDay

Description

@AnthonySteele-NewDay

Add a PackageReference to Humanizer.Core to a project with TargetFramework net8.0
I get this compiler warning:

Analyzer 'Humanizer.Analyzers.NamespaceMigrationAnalyzer' threw an exception of type 'System.IO.FileNotFoundException' with message 
'Could not load file or assembly 'System.Memory, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'  or one of its dependencies. 
The system cannot find the file specified.'.

Same result if I instead use a reference to "Humanizer" Version="3.0.1"

Is there a way to turn off the analyser Humanizer.Analyzers.NamespaceMigrationAnalyzer ? we're not intentionally using it.

Adding a package reference to System.Memory 4.6.3 does not change this issue.

What is that version number System.Memory 4.0.2.0, I don't see it here.

Adding a package reference to System.Memory 4.0.2 installs version 4.5.0 (which is the oldest listed on Nuget) and causes errors as it clashes with other packages.

It might be related to: #1655

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