[Mono-list] A webproject template

Jaroslaw Kowalski jaak@zd.com.pl
Tue, 30 Dec 2003 14:46:06 +0100


NAnt supports building visual studio solutions which include web projects.
Projects can be built over WebDAV against local files. So you can develop
with VS.NET and deploy/rebuild on Linux.

Actually I prefer to do it the following way in NAnt:

-----------
<project>
    <property name="web.path" value="c:/inetpub/wwwroot/mywebproject" />

    <csc target="library" output="${web.dir}/bin/mywebproject.dll"
debug="true">
            <references>
                <includes name="System.Data.dll" asis="true" />
            </references>
            <sources>
                <includes name="*.aspx.cs" />
            </sources>
    </csc>

    <copy todir="${web.path}">
        <fileset>
            <includes name="*.aspx" />
            <includes name="web.config" />
            <includes name="*.htm" />
            <includes name="*.gif" />
            <includes name="*.jpg" />
        </fileset>
    </copy>
</project>
------------

NAnt is smart enough to recompile only when *.aspx.cs have changed and copy
only files that have changed. This is compatible with ASP.NET and XSP/Apache
and works (modulo the directory paths) on Windows/.NET and Linux/Mono.

If you have any questions regarding nant, join
nant-users@lists.sourceforge.net.

Jarek

----- Original Message ----- 
From: "Philip Van Hoof" <spamfrommailing@freax.org>
To: <mono-list@ximian.com>
Sent: Tuesday, December 30, 2003 1:59 PM
Subject: [Mono-list] A webproject template


> Hi there,
>
> I've created a Gtk-Sharp template project called SharpDhcpdConf. This
> project is, of course, unfinished but it's auto* scripts are +- okay
> (they work).
>
> I am now planning to create a similar template webproject. I do
> understand that the Visual Studio.NET and other .NET freaks will respond
> with phrases like:
>
> "Xcopy deployment your dork!!"
>
> And my response is:
> Yeah yeah sure, but I want to do both development and deployment on a
> Linux computer. So I don't have VS.NET to compile the webproject for me.
> (Well, I have it but I don't want to use it).
>
> Since I don't know to much about Nant I decided to use auto* for the
> build procedure (it is, however, highly unfinished a.t.m.).



> I kindly invite everybody who is interested in this template to
> contribute idea's, fixes or patches so that sooner or later we have a
> template webproject that is actually usable like:
>
> We fetch a copy of the template, rename 4 things, start developing the
> webproject, we commit a first version .. and we can deploy, compile and
> develop it on both a xsp (Linux) and a IIS (Windows) ASP.NET server
> without any problems at all.
>
> Note that I am _not_ interested in VS.NET. I want to develop on Linux,
> period and end of discussion :). Really, I do, yes really.. so don't
> tell me that developing on VS.NET and doing a xcopy deployment to a
> Linux server is better and/or more easy: I already know that and thats
> not the point here. The point is that I want to enable my Linux desktop
> for ASP.NET webdevelopment :-).
>
> http://cvs.freax.be/cgi-bin/cvsweb/WebProjectTemplate/
>
> export CVS_RSH=ssh
> export CVSROOT=":pserver:anon@cvs.freax.be:/cvsroot/public"
> Password: anon
> cvs -z3 co WebProjectTemplate
>
> (It's a modified rssh shell, so don't try logging in, lol)
>
>
> -- 
> Philip Van Hoof, Software Developer @ Cronos
> home: me at freax dot org (change the From-field)
> work: Philip dot VanHoof at cronos dot be
> http://www.freax.be, http://www.freax.eu.org
>
> _______________________________________________
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>