Hi all,

 

I’ve only just discovered NAnt and I’m having a little trouble getting my VB.NETCF apps to build.  I have been able to get similar C# projects to build using csc, but as soon as I try to build a VB.NET project with vbc I am getting a lot of reference errors:

 

vbc : Command line warning BC2024 : the default assembly reference 'mscorlib.dll' has already been automatically added; ignored

            C:\path\sourcefile.vb(26) : error BC30002: Type 'IDisposable' is not defined.

           

                    Implements IDisposable

                               ~~~~~~~~~~~

            C:\ path\sourcefile.vb(53) : error BC30002: Type 'Guid' is not defined.

           

                Private uploadGUID As Guid

                                      ~~~~

 

There are pages of the above errors about various types / classes within the mscorlib assembly not being found.

 

My vbc task reads as follows:

 

<vbc output="${build.dir}/${project.name}.dll"

                        target="library"

                        nostdlib="True"

                        debug="true"

                        define="${current.build.defines}">

                       

                        <!-- This args tag was just an attempt at forcing the build to be .NETCF.  Not sure if I got it right though. 

                                    I’ve tried it with and without the args there. -->

                        <args>

                                    <arg value="/netcf /sdkpath:C:\Program Files\Microsoft Visual Studio .NET 2003\CompactFrameworkSDK\v1.0.5000\Windows CE\ /r:mscorlib.dll /r:system.dll /r:system.drawing.dll /r:system.windows.forms.dll /r:System.Data.SqlServerCe.dll" />

                        </args>

            <references basedir="C:\Program Files\Microsoft Visual Studio .NET 2003\CompactFrameworkSDK\v1.0.5000\Windows CE\">

                                                <includes name="System.dll" />

                                                <includes name="System.Data.dll" />

                                                <includes name="mscorlib.dll" />

                                                <includes name="System.Windows.Forms.dll" />

                                                <includes name="System.Data.SqlServerCe.dll" />

                                                <includes name="${project.libs.path}/OtherCustomAssemblies.CF.dll" />

                                    </references>

                                   

                                     <sources>

                                                <includes name="${nant.project.basedir}/**/*.vb"/>

                                     </sources>

                        </vbc>

 

Any ideas what I’m doing wrong?  I’m sortof hoping that someone has an example of the references / flags that should be set to sucessfully build VB.NETCF.

 

Thanks for any help offered.

 

 

Nick Hoggard

BEGIN:VCARD
VERSION:2.1
N:Hoggard;Nick
FN:Nick Hoggard
ORG:Xenacom Ltd
TITLE:Technical Team Leader
TEL;WORK;VOICE:+64 7 857 0620
TEL;CELL;VOICE:+64 21 158 9997
TEL;WORK;FAX:+64 7 857 0601
ADR;WORK;ENCODING=QUOTED-PRINTABLE:;;Waikato Innovation Park=0D=0ARuakura Road=0D=0APO Box 4363;Hamilton;;;New =
Zealand
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Waikato Innovation Park=0D=0ARuakura Road=0D=0APO Box 4363=0D=0AHamilton=0D=
=0ANew Zealand
URL;WORK:http://www.xenacom.com
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:20040803T205647Z
END:VCARD

Reply via email to