Visual Studio Team Services has interesting features like GIT storage and automated building triggered by GIT Commit. I'm trying to use the repository to keep static HTML site files and autobuild to publish files on hosting. Unfortunately the hosting doesn't support any publish way except of FTP connection.
Is it possible to use VSTS autobuild to publish entire site (with set of sub-folders) using FTP connection?
"cURL Upload Files" step supports FTP but it can't create folders structure automatically.
I believe that either "Batch Script" or "Powershell" or "Command line" task can help somehow but stuck with exact implementation :(
You can install FTP Uploader extension and then add this task in your build definition to publish files to FTP server.
Related
I have a Visual Studio solution which has various class libraries and several ASP.NET website projects. The website projects reference the class library projects, so for ease of working they need to be in the same solution.
The whole solution is version controlled through Visual Studio Team Services (now Azure DevOps).
When the solution is committed to VSTS, the solution is automatically built by VSTS.
I also want to use continuous integration and deploy the website projects in the solution to various web servers via FTP (FTP is the only option for this, MSDeploy etc is not available). The releases will be triggered by the build on commit.
The problem is that I need to publish the actual website files via FTP during a release triggered by the build, but the build artifact only contains .zip files.
For example, if the solution has a website project called 'MyWebsite' the build artifact has a zip called Mywebsite.zip, but no files are accessible. As such, I can deploy a zip file to the web server, but not the actual website files.
How can I deploy these files?
Furthermore, I don't want to deploy all of the files in the website project. I want to deploy a release version (similar to what is published using Visual Studio 2017's Publish tool), which the zip file seems to contain.
VSTS/Azure Dev Ops has Tasks built in to Extract Files and FTP Upload. The release pipeline also has a variables which you can access via release tasks and powershell. $(System.DefaultWorkingDirectory) is where artifacts(built code) are downloaded to. An Agent Job with two tasks should be able to accomplish what you are looking for.
Tasks
Details
Azure Dev Ops Release Variables
I need to publish the site via FTP but when I right click and choose publish, FTP is not an option. What do I need to do to publish this via FTP?
You need to do this in two steps.
Publish to the filesystem - see Visual Studio 2013 Preview: No Publish To File System?
Upload the files to ftp server using ftp client.
I want to deploy a website on check-in of code to TFS.
So I created a build definition that has MSBuild arguments (under Advanced)
/p:DeployOnBuild=true;PublishProfile=MyProfileName
This publish script copies the output to the website virtual directory folder on the web server.
My question is Is this the best way to do what I am d
So I have created a Web Site Application project in VS2008 and is fine on my local machine. Just wondering how to I deploy this to a dev server i.e via FTP i.e. do I need just copy over all files i.e.
Microsoft Visual Studio Solution
Visual Basic Project File
Visual Studio Project User options File
and the rest of my customer folder and files & web.config ?
And then when I have those moved and i.e I want to change the config file on the dev server, can I just change the web.config directly on that server or do I need to then open it visual studio on that server and recompile again ?
You can use the Publish Web Site options under Build Menu.
This option can deploy directly on the remote site whit FTP or can publish the file needed on a foolder on your local computer, so you only have to upload on the remote site.
After you deploy the web site if you have only to change the web.config you can use Notepd for it and don't need to recompile nothing... only if you change CodeBehind you have to recompile and upload only the DLL.
This link can Help you understan all the process
I think this is a simple question, but I can't seem to find a clean solution.
I am working on a parallel program on my local (dual core) developer machine. I develop for a while, then I want to run it on a multi-core server somewhere else. I have a settings file that is different (paths, etc.) between the two instances, but otherwise it is a straight deployment.
What I would like to do is have a "publish" option where I can just deploy it to server when I am ready. I don't want it to overwrite the settings file on the server, but I do want it to update any other files. I publish a ASP.NET web site this way and it works great. However, when I publish a console app, it wants to actually create an installer, which I don't want. I really just want an XCOPY publish over FTP, but one that won't overwrite changed files on the server.
I've tried subversion, and some FTP syncing things, but those all require an extra step. Is there an easy way to do this?
Not 100% sure what you're after, but WinSCP (free) has a directory synchronisation feature, which monitors a local directory for changes, and FTPs updated files to your server.
You can't do the type of publishing you want with a console app in Visual Studio 2010. It will always try to build a click once deployment which isn't your goal. I think this thing was possible to do in previous versions of Visual Studio 2010.
I have a similar situation and I just resign myself to copying in windows explorer for local servers. With your destination being an FTP site you will need to find some sort of automated or batch FTP utility unfortunately.
You could launch the ftp batch from the "Run the post-build event" feature in the Build Events tab on the console app's property page. That would save you some extra clicks.