I have an ASP.Net Core (1.0.1) web app. One of the packages it consumes itself consumes RestSharp. When built, the RestSharp dll is indeed in the app root. But when I deploy and browse to the app, I get the following error:
Application startup exception: System.IO.FileLoadException: Could not load file or assembly 'RestSharp, Version=220.127.116.11, Culture=neutral, PublicKeyToken=8d483824b1b4e30c' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'RestSharp, Version=18.104.22.168, Culture=neutral, PublicKeyToken=8d483824b1b4e30c'.
Let me be clear, here... the dll is the correct version: 22.214.171.124.
Now, if I register RestSharp to the GAC, all is well and the website works. But this is a .Net Core self-contained app and it shouldn't be looking in the GAC at all (should it??).
I'm really lost and confused. I honestly don't know what's going on, so I really could do with some help.
Thanks in advance.
App folder after publishing:
Sorry, I should have also mentioned that I'm targetting net46.