c# - Reference conflict with System.Net.FtpClient -


i have old c# .net 2.0 application, , need add ftp client (cannot make due simple ftpwebrequest alas) , have tried include system.net.ftpclient https://netftp.codeplex.com/ code autocompletes fine when type it:

system.net.ftpclient.ftpclient client = new system.net.ftpclient.ftpclient(); 

but following error:

the type or namespace name ftpclient not exist in namespace system.net 

i have tried fixing setting alias project reference system.net.ftpclient (ftp instead of global) , typing @ top:

extern alias ftp; 

and

the extern alias ftp not specified in /reference option 

if change .net framework 4.5 seems can around issue, application old addon sap business one, , changing 2.0 4.5 gives me tens of other errors sap-classes not have constructor etc, unfortunately cannot this. there other way can make work?

looks binaries distributed library don't support v2.0

have @ batch files used build project: https://netftp.codeplex.com/sourcecontrol/latest#create_codeplex_release.bat , https://netftp.codeplex.com/sourcecontrol/latest#create_nuget_release.bat

the both build against v4

set msbuild=%systemroot%\microsoft.net\framework\v4.0.30319\msbuild.exe

i tried installing oldest version on nuget still conflicts framework version 2.0.

but luckily provide project supports v2. download source code , open project named system.net.ftpclient.net2.csproj

now can use output of project instead of downloaded binaries.

hope helps.


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -