ASP.Net 2.0 daily build

Posted on 2006-04-20
Last Modified: 2008-03-10
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 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.
Question by:MogalManic
    LVL 37

    Expert Comment

    ...not the solution you're looking for...but an's what I've done since vs2003...since vs2003 had such crappy deployment tools...

    but I use a sync program called Allwaysync
    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
    LVL 21

    Author Comment

    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 (,
          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.
    LVL 21

    Author Comment

    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: 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.

    Accepted Solution

    Closed, 500 points refunded.
    The Experts Exchange
    Community Support Moderator of all Ages

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    I have developed many web applications with asp & and to add and use a dropdownlist was always a very simple task, but with the new, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
    IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now