Re: Nant 0.90 Problem with C# Script

"Gert Driesen" <[email protected]>
Newsgroups gmane.comp.windows.dotnet.nant.user
Message-ID <[email protected]>
Bob,

These are indeed in mscorlib, which is referenced by default.

Gert

-----Original Message-----
From: Bob Archer [mailto:[email protected]] 
Sent: woensdag 19 mei 2010 19:15
To: Gert Driesen; 'Ron Grabowski'; 'nant'
Subject: RE: [NAnt-users] Nant 0.90 Problem with C# Script

What can you code without System.dll? Doesn't that have all the base
types... or are those in mscorlib?

BOb

> 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:[email protected]]
> 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 <[email protected]>
> To: Ryan Boggs <[email protected]>; Simon H <[email protected]>
> Cc: [email protected]
> 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:[email protected]]
> Sent: dinsdag 18 mei 2010 6:39
> To: Simon H
> Cc: [email protected]
> 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 <[email protected]> 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
> [email protected]
> 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
> [email protected]
> 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


------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.