So, using the verbose NAnt setting, I got to see what it was passing to CSC.Exe – It turns out that this issue reproduces outside of the NAnt environment.  That being said, the fix is to tell NAnt to include the /noconfig option – This is because there is a Util Class in one of the default .NET Assemblies that are included by default.

 

For everyone’s reference here is the list:

 

# This file contains command-line options that the C#

# command line compiler (CSC) will process as part

# of every compilation, unless the "/noconfig" option

# is specified.

 

# Reference the common Framework libraries

/r:Accessibility.dll

/r:Microsoft.Vsa.dll

/r:System.Configuration.Install.dll

/r:System.Data.dll

/r:System.Design.dll

/r:System.DirectoryServices.dll

/r:System.dll

/r:System.Drawing.Design.dll

/r:System.Drawing.dll

/r:System.EnterpriseServices.dll

/r:System.Management.dll

/r:System.Messaging.dll

/r:System.Runtime.Remoting.dll

/r:System.Runtime.Serialization.Formatters.Soap.dll

/r:System.Security.dll

/r:System.ServiceProcess.dll

/r:System.Web.dll

/r:System.Web.Mobile.dll

/r:System.Web.RegularExpressions.dll

/r:System.Web.Services.dll

/r:System.Windows.Forms.Dll

/r:System.XML.dll

 

Aaron Elder
Director, Software Development

invokesystems
solid technology. sound thinking.
http://www.invokesystems.com

v: 425.818.5262
c: 425.761.7940
f: 425.818.5220
e: [EMAIL PROTECTED]


From: Castro, Edwin Gabriel (Firing Systems Engr.) [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 17, 2004 5:04 PM
To: Aaron Elder; [EMAIL PROTECTED]
Subject: RE: [Nant-users] Util Namespace Not Found

 

Although I have not been able to track down the problem… I have the feeling that this is some how related to some form of ambiguity. I imagine that NAnt is somehow referencing assemblies in a way that is not consistent with VS.NET. Perhaps one of the referenced assemblies (might be a .NET Framework assembly) contains a Util class or namespace that is clashing with your Util class. That would explain why fully qualifying the class works. Again, I don’t understand the code well enough to know whether this is possible. That is the feeling I get when I see this type of error though. Maybe this will spark some ideas to people with more knowledge than me.

 

--Edwin

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Aaron Elder
Sent: Wednesday, November 17, 2004 3:35 PM
To: [EMAIL PROTECTED]
Subject: [Nant-users] Util Namespace Not Found

 

Hey all,

 

I am brand spanking new to NAnt, but I have been able to get basic CS projects building.  One problem I have run into is with a project of mine that has a class called “Util” – After searching around; it appears others are having the same problem.

 

The problem is that when I build I get an error saying the type or namespace “Util” could not be found (am I missing an assembly reference).  Of course this is bogus, because the Util class is defined in a file called Util.CS and is being built as part of the project.  If I build it via VS it works great.  If I RENAME the Util class to say “Tools” it works.  If I fully qualify the Util class with its full namespace (ex: Company.Common.Util) it works.

 

Any thoughts?  I am using NAnt 0.85

 

Aaron Elder
Director, Software Development

invokesystems
solid technology. sound thinking.
http://www.invokesystems.com

v: 425.818.5262
c: 425.761.7940
f: 425.818.5220
e: [EMAIL PROTECTED]

 

Reply via email to