Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Better alternative to Web Deploy Projects

I have a solution with a fair few projects, 3 of them web-based (WCF in IIS / MVC site). When the solution builds, it dumps each of the components of this distributed system in a 'Build' folder. Running the 'configurator' part of the whole output will set up the system in the cloud automatically. It's very neat :) However, the Web Deploy Projects are a major pain. They "build" (i.e. deploy) every, single, time I build - even when no changes have been made to their respective projects.

Changed a single line of code? Look forward to waiting around a minute for the 3 web projects to redeploy.

[These projects are VERY straightforward at the moment - two have a single .svc and one .ashx file - the other is an MVC app with ~5 views]

I realise I can change solution configurations to not 'build' them, but I've been doing that and it's very easy to log on the next day and forget about it, and spend a couple of hours tracking down bugs in distributed systems due to something simply having not been built.

Why I use Web Deploy Projects? Well, because I need all pages + binaries from the web project. The build output for the project itself is the 'bin' folder, so no pages. The entire project folder? It has .cs, .csproj and other files I don't want included.

This will be building on build servers eventually, but it's local at the moment. But I want a quick way of getting the actual output files from the web project to my target folder. Any ideas?

like image 851
Kieren Johnstone Avatar asked Jul 24 '12 18:07

Kieren Johnstone


2 Answers

Not sure if this will help in your situation, (plug for own project coming up), but I am working on a project to help ease IIS deployments:

https://github.com/twistedtwig/AutomatedDeployments

The idea being you can use config files for IIS (app Pool, applications and websites) to automate the creation and update of sites locally (dev machines) or remotely (test and production machines).

It is still a work in progress but is ready to be used in production systems.

using the package creation as a post build step might get you closer to what you want, (don't believe it includes all the extra files), but that would still build it each time, (although if code hasn't changed it should not rebuild unless you choose rebuild all projects).

like image 87
Jon Avatar answered Sep 28 '22 04:09

Jon


In the end I created a utility/tool which, given a project file, XCOPYies the project folder for the web project to a target location, then looks in said project file and deletes anything that doesn't have Build Action set to Content. Very quick and effective.

like image 44
Kieren Johnstone Avatar answered Sep 28 '22 04:09

Kieren Johnstone