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>
<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