vs2015 FTP publish changed files - ftp

Unfortunately I don't have the luxury to use Web Deploy on a server. How can I update only the changed files over FTP in Visual Studio 2015?
Sounds like a question which has already been answered, right? Well I found questions for previous versions without good answers but that it is possible for publishing individual files.I still did not found a solution to publishing changed files over FTP. Is is just still not there over these years?
There is this option to allow Pre compile during publishing. But this does not have any effect with the default settings.
I am now just publishing it locally, then publish it using FileZilla because that one offers an option to only "overwrite if newer". Would be better to have this automated in VS.
Is there perhaps a possibility to use Web Deploy's logic over FTP?

Related

Create Visual Studio 2019 project from existing Azure Web App

I have a v7 Umbraco instance as a Web App on Azure but the machine the dev copy was on has been decommissioned and I need now to recreate the dev site in Visual Studio 2019, ideally cloning it from the live site in some way. I have created an empty project and, using the cloud explorer, downloaded the files from the app, but I am unclear whether I just copy them directly into the solution folder or into their own subfolder of the solution folder or whether simply copying them in will do the trick anyway as there's still the database to consider as well. I'm afraid I haven't used Visual Studio since creating this site three or so years ago and I seem to have forgotten most of what I did then anyway, so any help wpuld be greatly appreciated. The only advice I coud find via google was for older versions of VS and so not much help.
Recreating the original project from the live site is probably not going to be possible. It depends how and what you deployed to the live site.
It sounds like what you have is a working live site, but have lost access to the original source code. You should be able to copy the site and get it working elsewhere, but you're probably going to struggle to recreate the original development environment and amend the compiled elements of the website without access to the source code.
The Umbraco.com website has some great documentation on getting started and setting up Umbraco. Umbraco TV is great for getting up to speed quickly too. This should help explain the project structure. I suggest you create a blank Umbraco install to familiarise yourself with how Umbraco works(I wrote a post explaining how to do this with MS VS2015 here).
A typical deployment, using MS WebDeploy or FTP from Visual Studio, wouldn't deploy the project files or source-code for the compiled (.cs) elements of the website, these are usually kept as development files and checked in to source control.The live site probably only has the compiled versions of these file in the bin folder. The good news is the Razor template and view files(.cshtml) should be on the server.
However, if everything was uploaded (it happens) then you may have a chance, in which case you can download the files, potentially open the project and try to run the project locally on the development machine. There's no reason why you can't install an older version of MS Visual Studio alongside 2019 if there's an issue with that version. Although, I suspect this isn't an option since you felt the need to create a new empty project. If this is the case you might be able to add any project files to the the new empty project and attempt to recreate the project that way.
Regarding the database. You're going to need a copy or backup installed on a Microsoft SQL Server (unless you used MS SQL CE which is file based). You should be able to download a .bak file from the server if you're using Plesk or connect remotely using MS Management Studio if not, it depends on the host (Azure will allow access via MS Management Studio). Umbraco will need the connection string configured in it's web.config, the one you downloaded may be trying to connect to the live server so be careful.
Long shot ideas:
If you're really desperate you might be able to reverse engineer some of your compiled .dll using a tool like ILASM.exe but it's not going to be easy;
Perhaps you could reference the .dll in a the new project and it will all work auto-magically?! but I doubt this will work as there will be two application starting points and you'll probably get a runtime exception.

How to work on an external developer's project using Team Foundation Server

Me - Front End web developer with an ok working knowledge of writing VB.NET code but I have never built a .NET project from scratch using Visual Studio.
External developer - Experienced VB.NET developer but completely new to version control and TFS. Also extremely cheap and prone to infuriatingly poor programming practices. He does things that make you bang your head on the table.
Background
Our external developer has coded our site but over the last few years I have been tweaking aspects of pages and have managed to learn quite a bit of VB.NET along the way. He has never used source control and I don't think he's ever had to work with another developer before.
Up until now he has maintained a local copy of the website. He makes changes to this local copy and when he wants us to test it he uploads the relevant files to our dev server. I have no experience of Visual Studio projects/solutions so if I have made tweaks to things I have edited the aspx/asxh/config files in my preferred editor and then uploaded them to the dev server. If everything works correctly I ask him to download them from the server so he can update his local copy.
I have been maintaining a local git repository of the website for the last 2 years. If he makes a change I check it in.
Obviously this is a nightmare to work with so we have now insisted that he starts using version control. I recommended GIT but he has decided to use TFS.
He has now put his solution and all the files into TFS. I have installed Visual Studio 2015 and successfully connected to TFS. I have mapped the files from source control to my own workspace but I am now at a loss as to what to do next.
Questions
As soon as I open the .sln file he has uploaded it says I have checked out the file and made changes. When I check the diff it seems to be because I am using a newer version of Visual Studio than he is. Does the .sln file need to be in version control? Or are we suppose to maintain our own versions of the .sln file and simply check in everything else?
If I try and build the project it fails because the web.config is set up for his machine and not mine. How can we maintain 3 versions of the web.config file? One for my local, one for his, and one for our dev/live environments?
I am not convinced he will have added the project to TFS correctly because he's never used it before. This is basically the blind leading the blind.
Question 1:
You need to put the .sln file in version control. Before check out the .sln file, please do a "get latest" step, which will make sure both of you are working on the latest version. When you try to check your local version in the server, and he had uploaded his local version in the server. You may have to solve conflicts before the check in.
Question 2:
You should build your project and published the website on the server. The build agent will only maintain one version of the web.config file. If he has built the project with his web.config. And you want to build the project again with your web.config, the build agent will delete the previous web.config and pull down your version. Then build the project with your's web.config.
Moreover, if both of you are not similar with TFS. Suggest you taking a look at below MSDN link which related to source control and build.
Use Team Foundation Version Control
TFS Vnext Build

Setting up BitBucket and Mercurial for Use In a Group Environment

My company is currently implementing a versioning system using Mercurial and BitBucket. We currently have respositories set up on bitbucket and are able to use them, but our work processes for doing so are a bit clunky. We use Visual Studio for web programming in .Net. Currently, we have set up a cloned repository locally and work from there. We can do this using Visual Studio with VisualHg.
In order to edit files we open them in Visual Studio from the local repository and make our edits. We then commit our changes to Hg, which updates the repository as it should. Then we need to FTP the files from our local system to the DEV server for testing and then FTP again to the Production server once QA is completed and approved.
It would help streamline things if we could have the BitBucket repository synced with our DEV server so that all that was required is to commit changes for testing in DEV, bypassing the otherwise necessary step of locating and FTP'ing all relevant files.
Does anyone know if this is possible? If so, can you point me to any documentation that would show me how to set this up? Our developers would be eternally grateful. Thanks for your time.
In my opinion, using Mercurial is not the correct solution for this problem.
The main reason for it not being the correct solution is that the files that are in Mercurial are not the files that you want on the production server and so aren't the files that you want to use on your development server (because you want the QA environment to be as close to the production environment as possible). There are no assembly files stored in Mercurial (or there shouldn't be) and those are the files that the server should be using to run the application.
There are deployment tools built into Visual Studio that you can use for this task. They can be configured to upload all the necessary files with one button click.
Scott Hanselman has a post on his blog about this.
Troy Hunt takes it one step further by introducing a build server with this excellent set of posts. It uses Subversion as the repository but it can be done using Mercurial too.
I prefer the build server method as, once you have it set up correctly, it makes it 100% reliable. It will do the same thing every time you ask it to do the deployment. If you use Visual Studio to do it the developer doing the publish could choose different options and get it wrong.

Visual Studio 2010 Publishing So Slow

I'm using Visual Studio 2010 Premium, and find publishing via FTP through Visual Studio's build in publishing mechanism to be painfully slow. If I choose to manually FTP (with a client like FileZilla), I'm able to publish much quicker. Although I haven't measured it, publishing the whole site (i.e. overwriting all files) with FileZilla is in the neighborhood of 10 times faster than the incremental publishing of Visual Studio. Is anyone else experiencing this? Is there a way to address this issue?
Thanks
scenario: you don't mind publishing your source code, and you need to publish via ftp. visual studio's built in "copy web site" tool is prohibitively slow because it scans the server for changes and your website has many folders and files, but analyzing the server is unnecessary because you are the only person who updates your website.
solution: "web site publisher", the simplest and most genius program ever. it took me many hours to find it, which is why i felt the need to share it. you can configure it to scan only your hard drive for new/changed files and deletions, and then publish the changes since you last published to the ftp server. my solution won't work for pre-compiled asp.net web applications; works well for regular asp.net web sites.
download it here:
http://www.cryer.co.uk/downloads/websitepublisher/
you must enable the turbo optimization so that it does not scan the server. click "config", "optimisations", and then check "turbo".
here's my blog post saying the exact same thing:
http://devblog.alexsapps.com/2012/04/visual-studio-2010-copy-web-site-tool.html

Deploying from VS 2010 using XCopy

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.

Resources