0

I took over a project recently and it's using the NopCommerence package. When I load up the package in Visual Studio, it works fine, I have no troubles in VS, when I push live, everything is fine too, all works, but as soon as a few days sometimes even hours have passed, I get this error message:

Could not load file or assembly 'NPOI, Version=2.0.6.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

To solve this, I have to clean, rebuild and build the project and release a new set of files, my question is why does it randomly just fall over after so much time? I tried resetting the server, deleting temporary files but no luck.

Been doing this for weeks now and I can't find a solution.

Jessica
  • 115
  • 1
  • 8
  • Probably its a compatibility issue. Your specified version and the physical location version seem to be mismatching. – Dhrumil Nov 30 '15 at 11:20
  • The best way to solve problems involving commercial products (even open-source ones) is using their help/contacting the company. On the other hand, note that to understand/solve a problem as a programmer you would have to look at the given code (and let us look at it); otherwise, you would be asking as a user/consumer and this is not the place for you. Eventually, some people might have experienced the exact same issue, but this would be a quite unlikely scenario (and off-topic in SO; perhaps on-topic in SuperUser). – varocarbas Nov 30 '15 at 11:23
  • I have solved a similar problem by updating assembly bindings in web.config to reflect the version of the NPOI dll I use. – Akim Khalilov Mar 29 '20 at 20:05

1 Answers1

0

This seems to be an issue where your .NET assembler is looking for an assembly of a specific version and instead of finding that, it is finding the assembly of that same thing, but of a different version.

It means that it wont work until both the files, i.e the actual file at the location and the reference in your configuration are same.

Check your config and then check on the actual file. If its of older or newer version, then replace it with the version that is actually required.

Here are a few links for your reference.

Assembly version mismatch

Resolving assembly conflicts

Hope this helps.

Community
  • 1
  • 1
Dhrumil
  • 3,221
  • 6
  • 21
  • 34
  • And why it works during certain time and suddenly stops working? How can your assumption explain such a behaviour? Do you seriously understand how NopCommerce works internally (at least on this exact front) and you are proposing something likely to be accurate enough on account of such a knowledge or are you plainly making a blind assumption about something which you don't fully understand? – varocarbas Nov 30 '15 at 11:27
  • @varocarbas - While it might not be concluded what the actual cause is, we could narrow down the scope of possible causes by checking into every possibility that we know of. My thought might not help here, but this was what I experienced way back and how I managed to get through it. – Dhrumil Nov 30 '15 at 11:33
  • If you had some experience with this specific environment and you were able to somehow correct it, this would be undoubtedly something worthy to be shared. But the conditions would have to be similar enough to the ones here, mainly regarding the trickiest issue (working for some days and suddenly triggering an error). – varocarbas Nov 30 '15 at 11:41
  • @varocarbas - That is something I haven't come across till date. Not sure if something's happening with GAC or there is any specific manipulation happening from the application that is leading to this. – Dhrumil Nov 30 '15 at 11:46
  • Then why are you proposing a solution to solve something which you don't even understand? It might be a bug/incompatibility issue in the given package and, consequently, might only be solved by following their instructions (perhaps by updating to the latest version, perhaps by relying on a specific library; it might be anything). – varocarbas Nov 30 '15 at 11:49