So I had this (probably not) great idea of saving a asp.net mvc project on OneDrive so I could work on it on both a desktop and laptop system. This actually has worked well for several weeks, but today when I tried to open it I get Could not load file or assembly '' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
I've been searching Stackoverflow for a fix to this, but so far nothing I've tried has worked.
Is there a way I can just delete or edit the problem assembly?
EDIT:
I've tried cleaning and rebuilding the solution, no luck. I am using Git with this project. I've tried restoring from a recent commit, but I get the same error. The stack trace mentions System.Reflection.RuntimeAssembly, but I don't see this file in references.
EDIT:
Thanks for the continued suggestions, all. I did manage to get fuslogvw working, and it let me to my root folder, where using my laptop to edit the solution had somehow generated a file called projectname-laptopname (those are generics of course.) So I deleted this file, cleaned and rebuilt, however I am still getting the same error when I try to run the solution.
How I ended up fixing this was to comb through the error line by line, which led me to the bin directory (if anyone doesn't know bin is a hidden file, but the 'show all files' icon reveals it in solution explorer.)
From there I went through each dll, until I found one with the name of myproject-mylaptop.dll. There were actually more than one of these .dll files.
I don't know how or why this file was generated, or why it took so long to become a problem, but deleting all of them and then rebuilding the project solved the issue.
Thanks to everyone for your help! It kept me looking and gave me ideas of new ways to search for the problem. This was the thorniest issue I've had with VS to date.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With