Version does not match version of this assembly

Advertisement

ajwride1
Joined:
Posts:
2

Version does not match version of this assembly

Hi,

Sorry if this has been asked before but I couldn't find an answer - I have recently upgraded my C# app to use the latest version of winscp via upgrade in nuget. (5.13.1)

Since upgrading when I run my tests I get the following exception:
WinSCP.SessionLocalException: The version of C:\Dev\VisualStudio\OHR_3CX\OHR_3CX_Tests\bin\Release\winscp.exe () does not match version of this assembly C:\Dev\VisualStudio\OHR_3CX\OHR_3CX_Tests\bin\Release\WinSCPnet.DLL (5.13.1.0)

I've tried uninstalling and reinstalling. I've done a complete rebuild on the project. I've downgraded the version using nuget and still no joy.

Can you offer any suggestions of anything else to try or let me know if I'm being stupid - really appreciate your help.

Thanks in advance

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
29,562
Location:
Prague, Czechia

Re: Version does not match version of this assembly

Does the file C:\Dev\VisualStudio\OHR_3CX\OHR_3CX_Tests\bin\Release\winscp.exe exists? Does it match winscp.exe of WinSCP 5.13.1?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
29,562
Location:
Prague, Czechia

WinSCP .NET assembly uses FileVersionInfo.GetVersionInfo(exePath).ProductVersion to check the version.
If you do the same before calling the assembly, what does it return?

Reply with quote

Advertisement

You can post new topics in this forum