Chris, Are you sure you've imported the System namespace ?
Gert ----- Original Message ----- From: "Chris Hill" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, July 16, 2004 11:03 AM Subject: [nant-dev] Compiling vbproj getting a CLSCompliant error from vbc - have workaround > Hi all, > > Have been sucessfully using Nant to compile c# project for month now with no issues. However I now have a need to compile a VB project, so I was hoping it would be just as simple as C# Nant build process. However..... I've stumbled across the following error during the vbc compile: > > ============================================================ > > [vbc] Starting 'C:\WINNT\Microsoft.NET\Framework\v1.0.3705\vbc.exe (@"C:\DOCUME~1\xxx\LOCALS~1\Temp\tmp2B0.tmp")' in 'c:\nant\dataaccess' > > c:\nant\dataaccess\AssemblyInfo.vb(16) : error BC30002: Type 'CLSCompliant' is not defined. > <Assembly: CLSCompliant(True)> > ~~~~~~~~~~~~ > BUILD FAILED > > ============================================================ > Version info: > NET Framework - v1.0.3705 > NAnt 0.84 (Build 0.84.1455.0; net-1.0.win32; release; 26/12/2003) > > According to .NET Class lib help, "CLSCompliant" is ref'ed in Mscorlib (in Mscorlib.dll) which is covered by the inclusion of system.dll in the .build by the following: > > ============================================================ > > <references> > <includes name="System.dll" /> > <includes name="System.Data.dll" /> > <includes name="System.Xml.dll" /> > </references> > > ============================================================ > > I've tried directly including "Mscorlib.dll" in the <references> but the vbc ignores it - "'mscorlib.dll' has already been automatically added; ignored" > > I managed to identify a work-around by removing (commenting out) "<Assembly: CLSCompliant(True)> " in the AssemblyInfo.vb. > > However I'm a little worried about excluding the CLSCompliant Attribute as this may cause CLS-compliant issues if I ever need to integrate with CLS-compliant assembles in the future. > > Can anyone provide any comments or a fix for my .build to resolve the issue? > > Thanks in advance. > > Cheers, > Chris > > > > ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers