locked
Visual Studio 2015 ftp publish method doesn't always update changed files on publish. RRS feed

  • Question

  • User1967222892 posted

    Hi all,

    We have been using the ftp publishing method to upload our site to an external server. But have recently discovered that some of the JavaScript files that have been changed are not being updated when published.

    Additional Information:

    • We are using Visual Studio Team Services
    • We are using ASP.NET MVC.
    • We have the 'Exclude files from the App_Data folder' File Publish Option checked.

    We are not sure what is causing this to happen and would appreciate some assistance in resolving this issue.

    Thanks in advance.

    Edit 06-06-2016

    We suspect that the issue might be caused by source control. That the files that have been worked on and checked in on one machine are not seen as having been changed by the Visual Studio on the machine doing the publication.

    Friday, June 3, 2016 6:04 AM

Answers

  • User-166373564 posted

    Hi,

    You can also try Web One Click Publish.

    When you redeploy, Web Deploy automatically determines which files have  changed and only copies changed files to the server. By default, Web Deploy uses  last-changed dates on files to determine which ones have changed. Some source  control systems change file dates even when you don't change the file contents.  In that case, you might want to configure Web Deploy to use file checksums to  determine which files have changed. 

    See: Deploying a Code Update

    Regards,

    Angie

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, June 14, 2016 9:42 AM

All replies

  • User-1315512054 posted

    Hello,

    If the .js files are not excluded from the project all should be updated. The other option is if the .js files are updated on the server, but are in the browser cache, so the user should FLUSH the cache to reload the new files.

    Regards

    Friday, June 3, 2016 8:50 AM
  • User-166373564 posted

    Hi,

    As you mentioned above, we need expand File Publish Options, and then select Exclude  files from the App_Data folder. It's recommended to deploy the application to IIS on your development computer by using the same process that you'll use later to deploy it to your production environment. See: Deploying to Test

    Have a good day.

    Angie

    Friday, June 3, 2016 9:28 AM
  • User1967222892 posted

    Hi,

    All the .js files are included in the project and were published to the server on our first publish.

    The other option is if the .js files are updated on the server, but are in the browser cache, so the user should FLUSH the cache to reload the new files.

    We checked on the server to verify if the files have been uploaded and only found the old versions, so they weren't updated on the server.

    Friday, June 3, 2016 1:06 PM
  • User-166373564 posted

    Hi,

    You can also try Web One Click Publish.

    When you redeploy, Web Deploy automatically determines which files have  changed and only copies changed files to the server. By default, Web Deploy uses  last-changed dates on files to determine which ones have changed. Some source  control systems change file dates even when you don't change the file contents.  In that case, you might want to configure Web Deploy to use file checksums to  determine which files have changed. 

    See: Deploying a Code Update

    Regards,

    Angie

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, June 14, 2016 9:42 AM