1

I am using Asp.Net Mvc with Visual Studio 2017 Enterprise.

I am synchronizing my files with Visual Studio Team Services(VSTS) in the cloud.

I dont want to use Publish in Visual Studio. When i Check In my files to VSTS, i want VSTS to send my files to my server via FTP Upload.

I tried some menus in VSTS but i couldn't managed it.

My purpose is Publishing my files (built in my local pc via Visual Studio) by clicking only Check In Button.

By the way i used an VSTS extension named "FTP Uploader", but i couldn't managed it. It didn't work.

So i need a solution for this. Thanks anyway.

ysrtymz
  • 61
  • 12

2 Answers2

2

You could setup an automated release in VSTS to handle this (and optionally, an automated build before the release). When you create the release, there's an FTP upload task you can use as well.

Jacob Maki
  • 366
  • 3
  • 11
  • @ysrtymz You could use FTP upload task in build directly, so just create build with CI mode (https://www.visualstudio.com/en-us/docs/build/define/triggers#continuous-integration-ci) – starian chen-MSFT Jun 06 '17 at 06:38
  • i created a build definition and i t works when i check in. it starts to upload all the files in my project. but i need only checked in files. how could i ? – ysrtymz Jun 06 '17 at 07:55
  • I'm not aware of an easy way to get just the changed files. If you wanted to, you could probably write a custom build/release task that determines only the changed files since the last build/release and FTP only those. What's the reason you only want the changed files? I can understand philosophically that it doesn't make sense to FTP non changed files. However, it can be a bit more pragmatic to FTP all of them as the amount of effort could be high to just get the changed. – Jacob Maki Jun 07 '17 at 15:18
  • it is quite a big solution with 7 projects. when i check in it uploads all of the files. and it takes too much time. i don't have that time. whatever i gave up. Thank you for your effort. – ysrtymz Jun 09 '17 at 14:13
  • It looks like there are ways to FTP just the changed files based on [this other post](https://stackoverflow.com/questions/424680/trying-to-find-a-simple-way-to-do-upload-only-modified-files-through-ftp) if you decide to revisit. – Jacob Maki Jun 09 '17 at 15:07
1

Any way you go, you're going to need to create a build, which is how you should be building your software, not using local builds. Local builds run the risk of having different .DLLs on your machine as opposed to someone else's machine. A structured build validates that the solution can stand alone. Once you've constructed that, you can add a step to publish whatever you like to almost any destination. I'm not sure I understand your need for uploading to an FTP server, though - can you elaborate on that?

Jim Roth
  • 399
  • 2
  • 9
  • thank you. i have a virtual dedicated server, and a domain related to it. so i have its ftp info. – ysrtymz Jun 05 '17 at 15:56
  • Have you thought about using [Web Deploy](https://www.iis.net/downloads/microsoft/web-deploy) (assuming you're using IIS)? If you're willing to try something other than FTP, Web Deploy will only sync the changed files. – Jacob Maki Jun 09 '17 at 15:10