Home Self-contained Asp.net core (1.0.1) app cannot find RestSharp dll
Reply: 0

Self-contained Asp.net core (1.0.1) app cannot find RestSharp dll

user1532 Published in June 25, 2018, 4:05 am

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=, 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=, Culture=neutral, PublicKeyToken=8d483824b1b4e30c'.

Let me be clear, here... the dll is the correct version:

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:

    RestSharp.dll (v105.2.3.0)

UPDATE: Sorry, I should have also mentioned that I'm targetting net46.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.367127 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO