Re: Nant 0.90 Problem with C# Script

Simon H <[email protected]>
Newsgroups gmane.comp.windows.dotnet.nant.user
Message-ID <[email protected]>
Hi Ryan

 

Yes, I already have the <imports> tag content you specified. 
 
> Date: Mon, 17 May 2010 21:38:33 -0700
> Subject: Re: [NAnt-users] Nant 0.90 Problem with C# Script
> From: [email protected]
> To: [email protected]
> CC: [email protected]
> 
> 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;
> >
> > ________________________________
> > Looking for a hot date? View photos of singles in your area!
> > ------------------------------------------------------------------------------
> >
> >
> > _______________________________________________
> > NAnt-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/nant-users
> >
> >
 		 	   		  
_________________________________________________________________
Need a new place to live? Find it on Domain.com.au
http://clk.atdmt.com/NMN/go/157631292/direct/01/

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

_______________________________________________
NAnt-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-users
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.