Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • bh 444 posts 1544 karma points
    Jun 23, 2021 @ 12:12
    bh
    0

    ModelsBuilder error

    Umbraco v 8.8

    Could not load file or assembly 'System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.

    Anyone know how to remedy this error?

    I have System.Numerics.Vectors 4.5.0 installed. Nuget doesn't have 4.1.3 available only 4.1.1 and 4.3.0. What should I do?

  • Brendan Rice 538 posts 1102 karma points
    Jun 23, 2021 @ 15:51
    Brendan Rice
    0

    Hi Ben,

    can you post the full stack trace from the error message please?

    It sounds like there is a reference in the web.config to "System.Numerics.Vectors, Version=4.1.3.0,", can you search teh web.cofnig for any entries wit the string "System.Numerics.Vectors" and paste them here please?

  • bh 444 posts 1544 karma points
    Jun 23, 2021 @ 16:28
    bh
    0

    @BrendanRice

    This was in csc.exe.config:

    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-4.1.3.0" newVersion="4.1.3.0" />
          </dependentAssembly>
        </assemblyBinding>
    

    I read in another forum that I should add this to msbuild.exe.config: Some reason the forum isn't showing the code here...

    That didn't help.

    I tried to post the full stack trace it was too long. here's a link to it: https://www.dropbox.com/s/g0elcir5n0sjubg/modelsbuilder-error-stack-trace.txt?dl=0

  • Brendan Rice 538 posts 1102 karma points
    Jun 23, 2021 @ 17:08
    Brendan Rice
    0

    You'll need to change the binding redirect to match the version of the dll you've referenced.

    Anywhere in the .config file that references 4.1.3.0 will need changed to 4.5.0 (possibly 4.5.0.0).

    Also important to check the public key of the dll matches the PublicKeyToekn in the .config reference.

    Here is how:

    https://port135.com/public-key-token-assembly-dll-file/

    Once you've fixed the references it should* work.

    Let us know how it goes.

  • bh 444 posts 1544 karma points
    Jun 23, 2021 @ 17:45
    bh
    0

    FYI...the public key token was the same for 4.5 as it was for 4.1.3

    The reference I updated in csc.exe.config get's changed back to 4.1.3 every time I build my project.

    I read in another forum to add this to msbuild.exe.config:

    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <dependentAssembly>
            <assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-4.1.3.0" newVersion="4.5.0.0" />
        </dependentAssembly>
    </assemblyBinding>
    

    That didn't help either.

  • Brendan Rice 538 posts 1102 karma points
    Jun 24, 2021 @ 10:12
    Brendan Rice
    0

    Try move the assembly binding to the web.config

  • bh 444 posts 1544 karma points
    Jun 24, 2021 @ 13:40
    bh
    0

    That didn't work either.

    Here's what I put in web.config:

    <dependentAssembly>
        <assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.1.3.0" newVersion="4.5.0.0" />
      </dependentAssembly>
    

    Updated stack trace in case it helps.

    https://www.dropbox.com/s/irfsrgj4mkseqnr/modelsbuilder-error.txt?dl=0

  • Brendan Rice 538 posts 1102 karma points
    Jun 24, 2021 @ 13:46
    Brendan Rice
    0

    "The located assembly's manifest definition does not match the assembly reference."

    ^ this normally suggests that what is in the config file doesn't match what is in the bin folder.

    Usually when something like this happens it's to do with incorrect version numbers or the public key.

    Sorry I can't be any more help.

  • Brendan Rice 538 posts 1102 karma points
    Jun 24, 2021 @ 13:52
    Brendan Rice
    0

    For that you can also check the reference in the project file (open the .csproj in a txt editor).

    Look for something like:

    <Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
          <HintPath>..\..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
    </Reference>
    

    Maybe compare it to what is in the Nuget folder and the config file.

Please Sign in or register to post replies

Write your reply to:

Draft