Ron,

This was done to improve portability and readability of build scripts.
I prefer to give users more control (in this case over the assemblies they
want to reference in scripts).
If this change is causing too much trouble, we can always reconsider.

Gert

-----Original Message-----
From: Ron Grabowski [mailto:rongrabow...@yahoo.com] 
Sent: dinsdag 18 mei 2010 23:36
To: nant
Subject: Re: [NAnt-users] Nant 0.90 Problem with C# Script

Out of curiosity, why was this changed? Doesn't VS include System.dll by
default?



----- Original Message ----
From: Gert Driesen <gert.drie...@telenet.be>
To: Ryan Boggs <rmbo...@gmail.com>; Simon H <yo...@live.com>
Cc: nant-users@lists.sourceforge.net
Sent: Tue, May 18, 2010 5:36:03 AM
Subject: Re: [NAnt-users] Nant 0.90 Problem with C# Script

Hey Simon,

This is due to a (breaking) change in 0.90 (more specifically, 0.90 alpha
1).
You need to explicitly add a reference to the System assembly.

<references>
    <include name="System.dll" />
    ...
</references>

Gert

-----Original Message-----
From: Ryan Boggs [mailto:rmbo...@gmail.com] 
Sent: dinsdag 18 mei 2010 6:39
To: Simon H
Cc: nant-users@lists.sourceforge.net
Subject: Re: [NAnt-users] Nant 0.90 Problem with C# Script

Hey Simon,

If I remember correctly, System.Text.RegularExpressions namespace is
no longer imported in script by default anymore.  You probably need to
include the namespace manually but I can say for certain since I don't
know what's in your NAnt script.

Try adding this to your script tag:

<imports>
    <import namespace="System.Text.RegularExpressions" />
</imports>

Hope this helps,

Thanks,
Ryan

On Mon, May 17, 2010 at 9:23 PM, Simon H <yo...@live.com> wrote:
> Hi guys,
>
> I have a C# script within my NAnt script that works perfectly in NAnt
0.85.
> It imports the namespace System.Text.RegularExpressions for the purposes
of
> testing user input. However, when I try to run my build file using NAnt
0.90
> I get an error (see below). I have noted that NAnt 0.85 targetted the .NET
> 2.0 framework by default whereas NAnt 0.90 targets .NET 3.5 framework.
> However, I have tried running the build file after changing the default
> framework to .NET 2.0 and still get the same error. Any ideas? Thanks in
> advance!
>
> Compilation failed:
> c:\Documents and Settings\xxx\Local Settings\Temp\amfegm-q.0.cs(18,19) :
> error CS0234: The type or namespace name 'RegularExpressions' does not
exist
> in the namespace 'System.Text' (are you missing an assembly reference?)
>
>
//--------------------------------------------------------------------------
----
> // <auto-generated>
> //     This code was generated by a tool.
> //     Runtime Version:2.0.50727.1433
> //
> //     Changes to this file may cause incorrect behavior and will be lost
if
> //     the code is regenerated.
> // </auto-generated>
>
//--------------------------------------------------------------------------
----
>
> using NAnt.Core;
> using NAnt.Core.Attributes;
> using System;
> using System.Collections;
> using System.Diagnostics;
> using System.IO;
> using System.Text;
> using System.Text.RegularExpressions;

----------------------------------------------------------------------------
--

_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users
No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 9.0.733 / Virus Database: 271.1.1/2882 - Release Date: 05/18/10
20:26:00


------------------------------------------------------------------------------

_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to