Skip to content

Security-scan4x.zip build fails due to Method not found: 'System.ReadOnlySpan1<Char> Microsoft.IO.Path.GetFileName(System.ReadOnlySpan1<Char>) #290

@OrVarpi

Description

@OrVarpi

Environment:

  • Version: 5.6.7
  • Branch:
    • vs2019
  • Installation/Running method:
    • Standalone tool
      • Security-scan4x.zip from GitHub Release section
  • Operating System:
    • Windows

When running
I get this message security-scan
Msbuild failed when processing the file '[csprojFile]' with message: Method not found: 'System.ReadOnlySpan1<Char> Microsoft.IO.Path.GetFileName(System.ReadOnlySpan1)'.

A possible workaround/fix
I updated security-scan.exe.config with the following lines

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  <dependentAssembly>
    <assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
  </dependentAssembly>
  <dependentAssembly>
    <assemblyIdentity name="Microsoft.Build.Framework" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-15.1.0.0" newVersion="15.1.0.0" />
  </dependentAssembly>
</assemblyBinding>

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