Visual Studio: Publishing Windows Application to ftp no longer works - please help!

James Parsons 1 Reputation point
2021-05-21T06:52:20.72+00:00

I have been successfully publishing my Windows Applications built in Visual Studio for years now, to my website with an ftp account.

I can connect to the ftp with Filezilla and Windows 10, no problem, but not in the publish.

I've looked online for instructions, but they look rather different to my view of Visual Studio 2019.

To set up the publish I'm using the Publish Wizard... button.

I then "specify the location to publish the application", Browse...

And set the server settings.

Then I get the message in the Output window:
Publishing Files...

I wait for it all to happen, takes a while, the I get many messages like :

Severity Code Description Project File Line Suppression State
Error Failed to copy file 'C:\Users\James\Documents\Visual Studio 2017\Projects\Lasatron\LasatronForm\bin\Publish2\app.publish\Application Files\LasatronForm_1_3_0_23\ALGLIB.dll.deploy' to 'ftp://ftp.quantiseal.com/lastron/Application Files/LasatronForm_1_3_0_23/ALGLIB.dll.deploy'. Unable to add 'Application Files/LasatronForm_1_3_0_23/ALGLIB.dll.deploy' to the Web site.  Ready to proceed (200). LasatronForm 1

Severity Code Description Project File Line Suppression State
Error Failed to copy file 'C:\Users\James\Documents\Visual Studio 2017\Projects\Lasatron\LasatronForm\bin\Publish2\app.publish\Application Files\LasatronForm_1_3_0_23\Syncfusion.SpellChecker.Base.dll.deploy' to 'ftp://ftp.quantiseal.com/lastron/Application Files/LasatronForm_1_3_0_23/Syncfusion.SpellChecker.Base.dll.deploy'. Unable to add 'Application Files/LasatronForm_1_3_0_23/Syncfusion.SpellChecker.Base.dll.deploy' to the Web site. Can't change directory to Application Files/LasatronForm_1_3_0_23: No such file or directory (550). LasatronForm 1

When I look at the folders on the ftp I can see that it is creating folders but there are no files within.

Also I am getting a bad folder tree structure that is not correct.
Instead of:

publishFolder
       ApplicationFiles
                  MyApplication_1_3_0_21 (older version)
                  MyApplication_1_3_0_22 
                  MyApplication_1_3_0_23 (the version I just published)
                  etc

I am getting:

publishFolder
       ApplicationFiles
                  MyApplication_1_3_0_21 
                  MyApplication_1_3_0_22 
                  MyApplication_1_3_0_23 
                                    ApplicationFiles
                                                  MyApplication_1_3_0_23 
                  etc

As I say, this was all working before. I have not knowingly changed anything.

Hope that someone can help me through this process.

Many thanks;
James

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,828 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,604 questions
Visual Studio Setup
Visual Studio Setup
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
963 questions
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,962 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Daniel Zhang-MSFT 9,611 Reputation points
    2021-05-21T08:21:58.583+00:00

    Hi JamesParsons-7390,
    The first thing you can try is to enable FTP Passive mode on your publish settings configuration.
    Visual Studio only supports publishing to web servers that have Frontpage Extensions installed, regardless of whether connecting via FTP or HTTP.
    If your host doesn't support them, you will have to publish to a local folder and then upload its contents using an FTP client.
    And the FrontPage extension components need to be installed on the machine you are developing on.
    Here are some related links, I hope it will be useful to you.
    Visual Studio 2019 16.4.2 does not publish any files through FTP
    MSBuild ClickOnce app: FTP Upload files after build
    Best Regards,
    Daniel Zhang


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.