How to make visual studio 2015 publish only the files that are most current?

Asked

Viewed 1,413 times

5

I put a project in visual studio 2015 to try the tool.

It is an Asp.net mvc application, I publish it directly to the server by FTP.

Right click on the project, Publish, then I created an FTP profile and told not to delete the files before publishing.

In visual studio 2013 this is enough for him not to publish everything every time, in 2015 he is publishing everything, not deleting the files as requested, but about writes all of them.

Someone knows how to make it not happen?

  • I don’t think there’s any such behavior that you want for normal publication. Just by Web Deploy Visual Studio does this, but suddenly I may need to search a little more.

  • What I don’t understand is why the visual studio 2013 does this, an example that I can see clearly is the log4net dll, it stays inside the bin, when I publish by 2013 it does not replace it, when I send by 2015 it replaces it and all the others, I already checked the FTP profile configuration and the two are identical, what I do not understand.

  • I didn’t use VS2015 long enough to give you an answer, but I believe this behavior occurs through the safety of Build. In the past it was common for very strange errors to occur due to this avoid writing behavior, especially in DLL’s of databases.

1 answer

0

This feature that existed in VS2012 for partial FTP publication no longer exists, has been removed. I think only on the Web Deploy it is still possible to do the partial publication according to modifications.

Another way would be to upload outside the VS (totally external, or even configured in a "build step" of a specific build configuration, for example RELEASE or create a unique configuration for publication) Ai in this case you would have to create the scripts (it might even be another VS project, a DLL that does the dirty work, it could be a Powershell, Node.JS, etc.) to validate what was changed and to upload.

Here is an example using GULP (Node.js) to monitor changes: https://stackoverflow.com/a/39795922/1890220

In this example it monitors the files in real time and with each modification saved, it carries out the upload (upload) of the file (It can be catastrophic in a production environment, as you can change something to test and it can upload to production and stop your entire application if it is not well configured. Understand well configured as selecting only extensions/file types that pose no health risks to the application)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.