Menu

#3 New features (asp.net, monodev 2.0, exclude files)

open
nobody
None
5
2006-11-16
2006-11-16
No

I've been getting my projects to use Prebuild, so I can use nant for command line compiling and monodev and x-develop for my IDE.

In doing so, I found some problems:
- ASP.NET projects cannot be created
- Needed to exclude directories (not just individual files)
- Monodevelop projects cannot be made to target .NET 2.0
- NAnt build scripts do not add assembly reference paths, nor can refer to GAC assemblies

Attached is a patch which provides the following:

- Project type can now be set to 'AspNet' to generate asp.net project files for vs2003, vs2005, and monodevelop (works with mono 1.2 release). NAnt, autotools, and sharpdevelop have been updated to act the same as library type.

This uses the 'web application' type of project file for the vs2005 target (which is similar to the library project save one line). See http://webproject.scottgu.com/

- Added an <ExcludeMatch> tag, which is similar to the <Match> tag, but will exclude any files that match a particular path/pattern.

- Added monodev2 target to build monodevelop project files that will compile/run using .NET 2.0 (gmcs). Maybe this should be changed to use a command line switch, but works similar to how vs2003 and vs2005 determine the .net version.

- Reference paths included in the prebuild.xml will be output to NAnt build scripts

- If assemblies are referenced from the GAC, the full relative path will be used in NAnt build scripts

I hope these changes can make it into the next release, as they are all pretty much required for my use of prebuild.

I tried to use a similar style of coding to minimize the changes to the code. I hope you (and others) find this useful!

Discussion

  • Curtis Wensley

    Curtis Wensley - 2006-11-16

    Patch to rev.193

     
  • C.J. Adams-Collier

    Logged In: YES
    user_id=1315
    Originator: NO

    Hey there Curtis,

    I don't know how ASP.Net targets fit into our current system... I'll have to take a closer look at your patch. We can't really commit anything to the code that only works for one target and not for others...

    There are many changes in this one patch. Is there any way you can separate each of these fixes into a different patch? It would make it a lot easier to review and potentially commit.

    Thank you for your hard work!

    Cheers,

    C.J.

     
  • Curtis Wensley

    Curtis Wensley - 2007-04-20

    Logged In: YES
    user_id=288230
    Originator: YES

    Not a problem. I've split up the patches, and updated to the current version in SVN. Here's a summary of the patches:

    aspnet.patch: Provides ASP.NET support for monodevelop, vs2002, vs2003, and vs2005. For other targets, selecting an AspNet project will act the same as a Library (which is what the IDE's are doing). An alternative to this I thought of was just another flag instead of a separate output type.

    excludematch.patch: Provides a way to exclude a pattern of files (like an entire directory) from the build

    nantfixes.patch: Provides fixes to properly handle referencing assemblies in other directories and in the GAC (works both in windows and linux).

    monodev2.patch: Not really necessary any more (monodev target now defaults to .NET 2.0, but can no longer target 1.1 specifically). It makes the target 'monodev' for .NET 1.1, and 'monodev2' for .NET 2.0. This should probably be done using a separate property instead, since it's actually the same version of monodev. However, the other IDE's have different versions of the IDE for different versions of .NET, so monodev is somewhat unique.

    I don't mind doing any updates to these patches to make them more in line with the 'grand plan' for prebuild.

    Cheers,
    Curtis.

    File Added: aspnet.patch

     
  • Curtis Wensley

    Curtis Wensley - 2007-04-20

    ASP.NET patch

     
  • Curtis Wensley

    Curtis Wensley - 2007-04-20

    Exclude Match to exclude a pattern of files

     
  • Curtis Wensley

    Curtis Wensley - 2007-04-20

    Logged In: YES
    user_id=288230
    Originator: YES

    File Added: excludematch.patch

     
  • Curtis Wensley

    Curtis Wensley - 2007-04-20

    NANT fixes to add the paths of referenced assemblies

     
  • Curtis Wensley

    Curtis Wensley - 2007-04-20

    Logged In: YES
    user_id=288230
    Originator: YES

    File Added: nantfixes.patch

     
  • Curtis Wensley

    Curtis Wensley - 2007-04-20

    Monodevelop targets to distinguish .NET 1.1 or 2.0 usage

     
  • Curtis Wensley

    Curtis Wensley - 2007-04-20

    Logged In: YES
    user_id=288230
    Originator: YES

    File Added: monodev2.patch

     

Log in to post a comment.

MongoDB Logo MongoDB