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.
Related
We have a C# .NET project using Visual Studio 2013 and we're setting it up to release and deploy with Visual Studio Team Services (VSTS). The websites were pretty simple and easy to set up and they work fine. A few projects are libraries or Console applications and we're trying to determine the best method for creating an automated release for these.
The publish profile asks for a location to publish to - we've experimented with the build drop on our VSTS build server (where all of the other files are) and then asks for a website, a UNC path or a CDROM. We chose "UNC Path" and put the same build drop location in, but in UNC format.
It hasn't really worked yet, so I thought I would see if any best practices for creating VSTS releases and deploys for Console or Code Libraries exist.
Thank you!
Have you considered installing the agent on the target environments and using a release definition that simply copies the right files at the right place?
Regards
Note: copy path shouldn't be hardcoded and rely on variables.
To specify the agent queue by going to the tasks tab when editing the release definition. Click on the "run on agent" header, that will open the details, select your queue here.
Agent queues can contain multiple agents, so your job when you add agents is to organize them by queues that make sense in your context.
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?
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.
i developed a site in my local laptop. The site is quite in an dvanced stage so i'd like to test it in the remote server where it will be once finished.
I use visual studio 2010 and i was asking myself if it was possible to leave the site in the server and go on developing it in my machine without loosing syncronization.
I mean, suppose i find a bug while navigating the site from my laptop. I would like to fix it without copying the site locally, and then put it back on the server manually.
Is this possible with Visual Studio 2010?
Some more info:
The site is hosted locally in C:\Mysite\ and in the server in C:\Mysite\ (the same directory).
I can connect to the server with remote desktop but the connection is authenticated (of course)... I wrote this in case it's useful information.
Thanks in advance!
You can, by simply selecting Open -> Website and choosing from FTP or Remote Site in the directory browser.
However, just because you can doesn't mean you should! Keep a development and production copy separately.
Open VS2010 and then in File menu choose Open -> Website -> Remote site.
Then enter your remote address and it's done, you can work on your remote site as if it was local.
it is not a good idea to publish your code directly to your server. However if you would like to do it, you can think of setting up continuous integration process. Whenever you commit the code, you can run a msbuild or nant script which gets latest code changes from source control and push to the server. You can also sse something like webdeploy... which ideal for web projects...
In dreamweaver, it's really simple to set up a site so when you test a page that you are developing that it deploys it to a different test server that you are developing on and then browses to that page at that location also.
Question: Can you set up Visual Studio so that when you "run" or "View in Browser" that it automatically pushes the pages out to the test server and then browses to that location as well?
You've got two options as far as I can see:
1) Create a local project and set it up to run from your own local IIS, (this is not exactly what you're asking, but it should be more of an apples to apples test, as opposed to the built-in visual studio web server).
2) Use Remote Debugging to attach your Visual Studio instance to a remote server, links here and here
With option two, you'll still likely need to publish/deploy your solution to the server each time, but you will be able to step through and debug your code running on the remote server.
I think you can use an FTP project (File>Open Web Site and then select FTP) - as far as I'm aware, when you save a file it's automatically uploaded to the specified server. Then you could just point your browser at that web server.
I don't think this is possible,but you can always set up a shared folder where you put your code, and that shared folder is in fact the folder where your web server expect the code to be.