Emptying IIS website before automatic web deployment from TFS 2012 - visual-studio-2012

I'm automatically publishing a web project after build from TFS 2012 by using a publishing profile (I have a build definition on TFS that has /p:DeployOnBuild,PublishProfile... etc. as additional MSBuild arguments). Everything works fine. However, since my web site creates some temporary local folders I'd like to clean up before the next automatic deployment. Is there a way to easily clean up? Maybe some additional MSBuild argument?

You should switch to using Release Management for Visual Studio 2013. I have had it Woking fore more than one customer with 2012. You can then create orchestration that is specifically designed for deployment rather than compilation.
Release Management with Visual Studio 2013

Related

Using Visual Studio 2015 for existing node-js client-side web projects

I have a team working on a client-side node.js application. The sources are stored in a source control. I'd like to modify and debug this application in Visual Studio 2015. They use other IDEs, and I would not like to add additional VS-specific files such as .sln to source control.
I'm able to clone the repository, create a separate empty solution and add the repository as an "Existing Web Site". However, Visual Studio do not recognize package.json, and do not install dependencies as it would for MVC6 projects. Consequently gruntfile.js would not work either.
Is there any way to make Visual Studio see and process package.json, or I'm on a wrong track here?
Instead of using the "Existing Web Site" option, create a new solution and add items to it. Web Site Projects types are a different, legacy project type.

How to migrate code to different Visual Studio Online project?

I have my Visual Studio C# source code inside Microsoft Azure - Visual Studio Online (VSO), which is basically Team Foundation Server (TFS) 2013 in a Cloud. The Project was created using Microsoft Visual Studio Scrum 2013.3 Process Template.
I need to change process template from current (Scrum) to native Microsoft Visual Studio Agile 2013.3 Process Template.
Currently I do have only source code inside VSO and need to preserve all versions/check ins, with date/times and owners for whole team, there are NO any work items (tasks, bugs etc.)
One solution is to open a new Project inside VSO with Agile template, however how to migrate my code? or how to make simple / easy changes to current VSO project to change process template?
Create a new project and branch your code to the new project. The old project must remain to maintain history
use the TFS Integration tools to replay history against the new location.
(recommended) Switch to Git and use Git-TF to pull the history into git.
check out the tip and check into the new project.
The only option here that adds future value is to move to Git. Once there your history will be forever portable.

Continuous deployment from Visual Studio Team Services to Non-Windows Azure host

This is a (very) long shot, but I was wondering if its possible to deploy from Visual Studio Team Services to a website that is hosted on Rackspace?
Thanks
Jon --
I have used TeamCity (by JetBeans) and CruiseControl.NET to deploy web sites. They both work with TFS (and Git).
ThoughtWorks has released "Go" into open source; it, too, allows builds and deployments.
I can only guess -- but would be confident -- that Visual Studio Team Services will work with any of those products.
-- Don

Publishing projects without VS Publish

Our team has been having quite a lot of trouble with Visual Studio's publish feature. We use TFS and are all running VS 2012 ultimate. It works fine when only one person is involved in a project, but when we get many people inside one project, the publish profiles get off and Visual Studio reports a successful publish even when all files haven't been copied up. I've read all the SO questions about why this happens and I understand that TFS adds the publish profiles to the source control automatically. If we create a new publish profile and republish, everything works. But this is not sustainable. I can't prevent VS from automatically adding the publish profiles to TFS (if we could, I think this would solve the problem) so I'm now looking for better ways to publish an application to a web server. Is there a better tool out there to publish web applications or do I need to write my own VS extension?
Per this question (https://stackoverflow.com/a/12393154)
The temporary answer seems to be to change your settings from release to debug, save, then switch it back. This causes the pubxml.user file to be rebuilt, which is actually the problem.

Loading a Windows Azure Project from Gallery into Visual Studio 2012

I have a Windows Azure web site. I started this web site as a New -> Compute -> Web Site -> From Gallery. Once here, I chose the Orchard CMS. I have the site successfully running in Windows Azure. My challenge is, I want to do some customizations to it.
How do I get this code into my local Visual Studio 2012 instance so that I can:
Make customizations to the site with Visual Studio 2012.
Check it into source control so other on my team can work on it
I saw the following post: http://www.davidhayden.me/blog/installing-orchard-cms-as-an-azure-web-site. However, this only talks about opening the site in WebMatrix. I want to skip WebMatrix and go straight to Visual Studio if possible.
Download WebMatrix and click the Visual Studio button in the ribbon. It must create a solution file for you to then access your website via Visual Studio. I don't have an Azure website at the moment to try it with.
You may need to tweak the registry to get the VS 2012 to open properly:
Type regedit and select the HKEY_CLASSES_ROOT.
Locate VisualStudio.DTE and change the CurVer to
VisualStudio.DTE.11.0
Finally change the CLSID to {059618E6-4639-4D1A-A248-1384E368D5C3}
You do not need to use WebMatrix at all; another option is to just download the files from FTP and then create a VS solution and add the files you downloaded.
From Visual Studio you can easily deploy the solution to TFS and to your azure website.
As a side note, as of today (January 28th, 2014) the registry edit proposed by SilverNinja is no longer needed, I was able to open VS 2013 Professional from Webmatrix without editing the registry.

Resources