I have developed a class library (dll) that uses WinSCPnet.dll in Visual Studio 2015. While troubleshooting why it was looking for the wrong dll, I added the Nuget for it, getting the most recent version. The version we are using is actually a few before that, so I uninstalled the latest (using Nuget) and installed the version I want. Now, when it runs, it is looking for the newest version.
System.IO.FileLoadException: Could not load file or assembly 'WinSCPnet, Version=22.214.171.12425, Culture=neutral, PublicKeyToken=2271ec4a3c56d0bf' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
I have tried searching the registry, gacutil /u (which ran successfully and removed the dll but I still get this message), cleaned the project and rebuilt, deleted everything in bin and obj and rebuilt - what am I missing?
Try this :
Unload your project , right click, edit .csproj file .. find your reference , it's gone be something like this
<Reference Include="WinSCPnet, Version=126.96.36.19925 .../>", edit that create open close Reference tag
<HintPath>path to your dll file here</HintPath>
Hope this helps!?
User contributions licensed under CC BY-SA 3.0