Disclaimer: i'm not an expert so i might say bullshit :-)
i have 2 subfolders folders in the microsoft .net folder , one named Framework and the other Framework64
plus i have a second PC (virtual machine) that works 32 bit and only has the Framework folder.
so in the end on the normal machine i can use both these commands
%WINDIR%\Microsoft.NET\Framework\<version>\RegAsm.exe WinSCP.dll /codebase /tlb
%WINDIR%\Microsoft.NET\Framework64\<version>\RegAsm.exe WinSCP.dll /codebase /tlb
while on the virtual machine only this
%WINDIR%\Microsoft.NET\Framework\<version>\RegAsm.exe WinSCP.dll /codebase /tlb
on the normal machine i had an error while registering with Ver 4 so in the end i tried all the combination of 64 and 32 bit v2 and v4.
So i don't know which one was in the end registered. The final result was that i could load the module in excel but they were not properly working giving me the error.
I then thought it might be an excel 2010 64 bit related issue and i decider to try it on the Excel 2007 of the virtual machine. It worked without any problem
so i went back on Excel 2010 64 bit reinstalled everything from scratch (WinSCP reinstall) and registering it again (i did it with the framework 64 only. v2 only was working while v4 still give error), this time the code worked properly...
Considering all this I came to my guessing of the 64 bit registering issue. I know it might however relate to something else, the important thing is that it works now :-).