What is the best way to set AutoDeployment for Dot Net Nuke Web Site in TFS - asp.net

i am looking for a way to autodeploy a Dot Net Nuke website by TFS after checking in. I also need to some how transform web config to the right connection for the deploy server.
Since this is a website but not a web application, thing becomes tricky. If you have done it before, please give me some idea.
Thanks

I have not done auto deployment with TFS but did automate the process with SVN. What we did is simply have the script deploy everything that had changed since last login to the web server - EXCEPT - the web.config.
Database scripts were handled by a process like this but those were not as reliable as the SVN code deployment was.
HTH

You could use a deployment tool such as kwatee (self promotion). Kwatee is configured via a web GUI and can then deploy any application or site via python scripts and transform files along the way.

You can use Visual Studio web deploy feature. ALM Rangers shipped a ready to use BRDLite Reference template for this purpose which you can download here. Also, check this link for documentation for the template usage.

If you're using VS2010, you can use a Web Deploy Project in your solution. TFS will talk to the WDP as it would with a web application's project file.
For config transforms, you can use a tool called SlowCheetah.

Related

Change deploy location for solution published using web deploy

For a long time I have been performing dated deploys to our IIS servers, basically this means that each deploy gets its own dated folder within the web site folder (c:\sites\my-site\20140824-1236 for example). I then redirect the web app to the new deployment folder.
This gives us a quick role back capability if things go pear shaped.
The problem is that we are looking at moving deployment over to the new web deploy techniques, while we have been using the new techniques within QA and UAT for a while - the standard behaviour is to simply replace the files at the location defined within the IIS web site.
Before I go and start looking at remote PowerShell to re-configure IIS before executing the web deploy.. does anyone know how I can achieve this using standard web deploy.. maybe with msbuild extensions or something?
How about using the automatic backup capabilities in Web Deploy v3?
http://www.iis.net/learn/publish/using-web-deploy/web-deploy-automatic-backups

Classic asp - How to automate deployment - in continuous integration environment

I've been doing some reading http://vishaljoshi.blogspot.com/2010/11/team-build-web-deployment-web-deploy-vs.html and https://michaelbaylon.wordpress.com/2011/04/13/managing-sql-scripts-and-continuous-integration/ ... etc on automated deployment and continuous integration etc but non of it seems to talk about automated deployment in a classic asp environment and you can't really do proper CI unless you get into automated deployment.
Can MSDeploy deploy a classic asp website? If not ... is it best to just write a build script that copies all the files over to the correct folder and then start up IIS? I've done this using msbuild and the robocopy msbuild extension task. But then how do you handle the different environments (QA, dev, staging, production) there's no web config to put the different connection strings etc ... supposedly msbuild is configuration aware ... but how does that work when there is no web config?
So with all these questions I'm struggling to really move forward with creating a deployment script / module / exe for our classic asp website. Does anyone have any answers / resources / further questions that they can point me in the direction of?
Web Deploy (http://www.iis.net/download/WebDeploy) is the way to go. You just have to customize the deployment script for different environments.
You might find this links helpful:- http://msdn.microsoft.com/en-us/library/ms241740.aspx- "Build" Classic ASP with TFS 2010
MSDEPLOY can deploy anything that can live in IIS. You can create a package from the existing web site, and examine it to see what got packaged. You should be able to use that to determine how to package up your site from sources.
You should even be able to create a Visual Studio project from your sources so that you can use the Web Publishing Pipeline directly. The fact that there is nothing there to compile shouldn't stop you from specifying that your .ASP files are content files.
Checkout using cruisecontrol.net, we use that for our automated deploys along with msbuild and it works great. We are a .Net shop but it's basically the same thing. Cruise Control can run scripts and does handle the web.config / global.asa transformations pretty good. As long as you can script it cruise control could handle it.
Depending on your development environment you might be able to hook it into cruisecontrol. We use TFS and it integrates nicely so when we check items into our different branches (Dev, Main, Stage) it auto deploys the site to the appropriate location.
Deploying to our production environment we use MSbuild to move the code. Since it's in another network location we needed something that could go outside and do any server updates necessary.
http://cruisecontrol.sourceforge.net/

Best ASP.NET application Deployment method

Which is the best method to deploy a web application. Currently i am publishing the application and placing that folder in the server and creating virtual directory and providing windows authentication.
I just want to know this is a better metod to deploy or i need to use any other deployment technique?
Plese suggest
It really depends on the situation. For some situations, using Visual Studio's publish feature (right click project) works great. However in some situations, particular larger organizations or environments where the infrastructure group and development team are a little more isolated, you need to use a Web Application Installer or an MSI package. I've also had instances where the easiest thing to do was create a simple .bat file and create an external command in Visual Studio.
Use a web application installer, easy to create with Visual Studio.
If you need a third person to deploy your application in production servers, I would suggest you to deploy using a MSI, it would also help you to version your release.
MSI can be created using various ways including but not limited to
Deployment projects in VS studio
WixGen
Click once

How to publish ASP.NET website with alternative configuration settings

I am working on a web project as a Web Site, rather than a Web Application. How can I use a different config file depending on where it is hosted from, so the local version uses my local SQL install, but the published version uses the live database? e.g. connectionStrings.config ignored (not published), connectionStrings.live.config published as connectionStrings.config
I see a policy file option, would that be something able to do this?
There are several options regarding this. The simplest is to use a web deployment project. The ScottGu's post goes into more detail on this.
For larger projects you will need something like Nant or MSBuild and CruiseControl or TeamBuild.
I also posted something here a while back on supporting complex config deployments
Use a MSBuild or NAnt script for different builds.
You can use a Web Deployment project. Check out ScottGu's blog post.
Post Build Event which swaps the config over?
you can have a different post build event depending on your build configuration, each can copy a different config if needed.

ASP.NET Web Application Build Output - How do I include all deployment files?

When I build my ASP.NET web application I get a .dll file with the code for the website in it (which is great) but the website also needs all the .aspx files and friends, and these need to be placed in the correct directory structure. How can I get this all in one directory as the result of each build? Trying to pick the right files out of the source directory is a pain.
The end result should be xcopy deployable.
Update: I don't want to have to manually use the Publish command which I'm aware of. I want the full set of files required by the application to be the build output - this means I also get the full set of files in one place from running MSBuild.
One solution appears to be Web Deployment Projects (WDPs), an add-on for Visual Studio (and msbuild) available that builds a web project to a directory and can optionally merge assemblies and alter the web.config file. The output of building a WDP is all the files necessary to deploy the site in one directory.
More information about Web Deployment Projects:
Announcement on webdevtools MSDN blog for WDP 2008
ScottGu introduction to WDP 2005
The only disadvantage to this solution is the requirement on an add-on which must be available on the build machine. Still, it's good enough for now!
ASP.NET doesn't have real xcopy deployment for new sites. It depends on having a virtual directory/Application in IIS. However, once that virtual directory is created you can use xcopy for updates.
You can Publish Web site..If you want to automate your deployment, you need to use some script.
Have you tried using the aspnet_compiler.exe in your .net framework directory? I'm pretty sure you can create a "deploy ready" version of a web application or web site.
The _CopyWebApplication target on MSBuild will do exactly what you need. The catch is that only the main assembly will be copied to the bin folder and that's why a copy task is needed to also copy any other file on the bin folder.
I was trying to post the sample script as part of this post but wasn't able to.
Please take a look at this article on my blog that describes how to create a MSBuild script similar to the one you need.
Have you tried right clicking the website in Solution Explorer and clicking 'Publish Website'?
Build --> Publish
A dialog box will appear that will guide you through the process.
For the automated building you describe in the update, I would recommend you look into MSBuild and CruiseControl.NET
It depends on how complicated solution you need, you could just use a script and jenkins for example. You can use MSBUild with Jenkins for just deploying to an IIS. And if you got Jenkins other tools is pretty easy to connect into it later on. But if you just want to build, use a script that jenins execute every build that uses MSDeploy and it will work great.
This is how i do it, just to give you a feeling:
Sonarqube uses Gallio, Gendarme, FXcop, Stylecop, NDepths and PartCover to get your metrics and all this is pretty straight forward since SonarQube do this automatically without much configuration.
Here is Jenkins witch builds and get Sonar metrics and a another job for deploying automatically to IIS. I use a simple script one line that calls my MSBuild and wich URL, pass and user.
And Sonarqube, all metrics for my project. This is a simple MVC4 app, but it works great!:
If you want more information can i provide you with a good guide.
This whole setup uses MSBuild, too build and deploy the apps.

Resources