Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 893
  • Last Modified:

ASP.Net 2.0 daily build

I have written a ASP.Net 2.0 application that I want to publish to a remote web server.  Everything works perfect when I do it from my machine that has VS 2005 Standard Edition installed on it.  I can use MSBuild, or VS "Publish Website" to publish the file to a remote directory.

The problem occors when MSBuild is executed from a machine that does NOT have VS 2005 installed on it.  It seems that MSBuild and ASPNET_COMPILER is somehow hard wired to the project installed on my machine.  

Is there any way to build a script (MSBuild or nant) to build the asp.net application independant of VS2005.  I want to build a script that will take the code out of the SubVersion repository and build it to the development web server.
  • 2
1 Solution
...not the solution you're looking for...but an alternative...it's what I've done since vs2003...since vs2003 had such crappy deployment tools...

but I use a sync program called Allwaysync www.allwaysync.com
free to use for a small number of files.
that in addition to a program called netdrive, also available on their site.
but netdrive lets you turn an ftp address into a mapped local drive

so I map the deployment server to a drive and then set allway sync to sync with the project folder
you can use alwaysync to exclude non-needed files so that it only syncs the files needed for deployment

you can also schedule how often it syncs the folders

so when the setup is done...when I need to deploy...all I do is run build in vs and then hit the sync button in allway sync
MogalManicAuthor Commented:
That is effectivly what we are doing now.  Just syncing the Subversion repository with the Webserver directory:
  1) Configure ASP.Net directory to automatically compile on change of CS or ASPX file
  2) Using CruiseControl.net (http://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NET),
      we update any directories/files that change (every 30 seconds)
            a) If the change is to web.config some manual changes (file paths differ) will have to occor
  3) When the page is accessed by a user, iis compiles it beforehand.

This works for now (it is a development environment), except when a major change occors.  When this happens, some will have to manually restart IIS (or the web app).  When we want to make a production build I manually run MSBUILD on my machine, and my buildmeister copies it to the production web site.

What I want is a solution that will run independant of my computer and precompile the web site in development just like it is done in production manually.
MogalManicAuthor Commented:
We solved this one ourselves.  Here are the steps for anyone interested
   1) Run MSBuild and capture output in file.
   2) Build Nant/batch script which does the same thing:
           a) Stop IIS on production machine
           b) ASPNET_COMPILER.EXE -v \WMS -p c:\workspace\WMS -u -f -d -fixednames \\Blade\WmsDev
           c) Make changes to web.config (i.e. change paths, turn off debug, configure build #...)
           d) Start IIS on production machine

Now, we have the following setup:
  Development: CruiseControl.net building from Subversion whenever change is checked in(SVN is polled every 15 seconds)
                       This application autocompiles the codebehind in IIS when the page is accessed.

  Acceptance/Production:Nant script run on demand when build is requested.
Closed, 500 points refunded.
The Experts Exchange
Community Support Moderator of all Ages

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now