Could not load file or assembly ServiceStack.Interfaces, Version=4.0.0.0, Culture=neutral, PublicKeyToken=e06fbc6124f57c43

烈酒焚心 提交于 2019-12-10 22:46:51

问题


I encountered the following error after upgrading to ServiceStack 5.0.2

Could not load file or assembly ServiceStack.Interfaces, Version=4.0.0.0, Culture=neutral, PublicKeyToken=e06fbc6124f57c43

Here are the references in my project file

<PackageReference Include="ServiceStack" Version="5.0.2" />
<PackageReference Include="ServiceStack.Api.Swagger" Version="5.0.2" />
<PackageReference Include="ServiceStack.Text" Version="5.0.2" />

Here are the reference seen from VS.

I dont have 'ServiceStack.Interfaces' reference in project file. So it is referenced indirectly somehow.

I dont know why it is trying to load an older version 4.0.0.0 when ServiceStack 5.0.2 is referenced.

So I intended to add bind rediction in app.config but then I found that is impossible.

In the binary folder, I do see ServiceStack.Interfaces.dll there. Its version is 5.0.0.0 but its PublicKeyToken is null. It does not allow redirecting the binding.

I tried to add a direct reference below but that does not solve my issue.

Why it is trying to load an older version?


回答1:


Delete your NuGet /packages folder and restore from NuGet again. You should only have ServiceStack v5.0.2 dependencies, if you have any other version you still have old package references that still need upgrading to v5.0.2.



来源:https://stackoverflow.com/questions/49932900/could-not-load-file-or-assembly-servicestack-interfaces-version-4-0-0-0-cultur

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!