My company is migrating to Azure, and I'm using edtFTPnetPRO version 10.1.0 in an Azure Function app. When downloading files I receive the following exception:
Could not load file or assembly 'System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified. at EnterpriseDT.Net.Ftp.FTPConnection.InvokeDelegate(Boolean preferGuiThread, Boolean permitAsync, Delegate del, Object[] args)
at EnterpriseDT.Net.Ftp.FTPConnection.InvokeEventHandler(Boolean preferGuiThread, Delegate eventHandler, Object sender, EventArgs e)
at EnterpriseDT.Net.Ftp.ExFTPConnection.InvokeEventHandler(Boolean preferGuiThread, Delegate eventHandler, Object sender, EventArgs e)
at EnterpriseDT.Net.Ftp.ExFTPConnection.InvokeEventHandler(Delegate eventHandler, Object sender, EventArgs e)
at EnterpriseDT.Net.Ftp.FTPConnection.OnDownloaded(String localPath, String remoteFile, Int64 bytesTransferred, Boolean resume, Exception ex, Int64 remoteFileSize, DateTime remoteModTime)
at EnterpriseDT.Net.Ftp.FTPConnection.DownloadFile(String localPath, String remoteFile, WriteMode writeMode)
at EnterpriseDT.Net.Ftp.ExFTPConnection.SyncDownloadFile(String localPath, String remoteFile, WriteMode writeMode, TransferParameters transferParams)
at EnterpriseDT.Net.Ftp.ExFTPConnection.DownloadFile(String localPath, String remoteFile)
at EDICommand.FTP.EDIFTP.Pull(String pathToFiles, String destPath, Boolean bDelSourceFiles) in D:\Git\AzurePrototypes\EDICommand\EDICommand\FTP\EDIFTP.cs:line 474
Is there a dependency here? I use .Net 6 for the Azure Function app, but I've not been able to find any edtFTPnetPRO version 10.1 package at nuget.org. I simply include the dll and create a project reference to it. It seems to fail during event callbacks.