Gert, thank you for offering to help.  Your remark about every winform app
having a "Main" sub made me check that I was including everything as a
source for the <vbc>.  Sure enough, I wasn't even including the file
"SendEmail.vb".  The vbc compiler couldn't use something that wasn't there.

Thank you for your help!

Lainie Ereno
Delinea - Gulf South
972-692-0461 Office
713-544-9077 Fax
[EMAIL PROTECTED]


-----Original Message-----
From: Gert Driesen [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 08, 2004 12:02 AM
To: Ereno, Lainie (Consultant); [EMAIL PROTECTED]
Subject: Re: [Nant-users] VBC to Compile Windows - Sub Main Not Found


Ereno,

Every winform app has a "Main" sub as entrypoint. That entrypoint might 
ofcourse be in another class.

Can you send me your project, and sources ?

Gert

----- Original Message ----- 
From: "Ereno, Lainie (Consultant)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 07, 2004 10:23 PM
Subject: [Nant-users] VBC to Compile Windows - Sub Main Not Found


>I am trying to use Nant to compile a VB.NET Windows application.  My
> application does not use "Sub Main" as an entry point.  Instead it uses a
> Windows Form called "SendEmail" which contains a public sub
> "SendEmail_Load".  The Windows Form "SendEmail" is a public class that
> inherits from System.Windows.Forms.Form.
>
> When I use <vbc> task I get the error "vbc: error BC30420: 'Sub Main' was
> not found in 'SendEmail'".  I have tried setting the main attribute to
> "SendEmail" and "ISAReports.SendEmail".  I've also tried adding the <arg>
> element with value of "/main:SendEmail" and "/main:ISAReports.SendEmail".
>
> Can anyone help me understand how to change the startup entry point to
> "SendEmail"?
>
> My build code:
>
> <project default="all">
>
>    <property name="project.name"     value="ISAReports" />
>    <property name="build.dir"        value="c:\temp\${project.name}\build"
> />
>    <property name="dist.dir"         value="c:\${project.name}_DEV" />
>    <property name="source.dir"       value="c:\${project.name}\source" />
>    <property name="debug"            value="false" />
>    <property name="trace"            value="false" />
>    <property name="root.namespace"   value="${project.name}" />
>
>
>    <target name="init" description="Prepares the environment for a
> successful build (creates build folders, etc.).">
>        <delete dir="${build.dir}" failonerror="false" />
>        <mkdir  dir="${build.dir}" />
>        <mkdir  dir="${build.dir}\bin" />
>        <mkdir  dir="${build.dir}\bin\EnumerationAssembly" />
>    </target>
>
>    <target name="build" depends="init" description="Compiles and creates
> the project exe.">
>        <vbc debug="${debug}"
>             defineTrace = "${trace}"
>
>
imports=",Microsoft.VisualBasic,System,System.Collections,System.Data,System
> .Diagnostics,System.Drawing,System.Windows.Forms,System.Web,System.XML"
>             optioncompare="binary"
>             optionexplicit="true"
>             optionstrict="false"
>             output="${build.dir}\bin\${project.name}.exe"
>             removeintchecks="true"
>             rootnamespace="${root.namespace}"
>             target="winexe"
>      main="SendEmail" >
>      <arg>
> <arg value="/main:ISAReports.SendEmail" />
>      </arg>
>
>            <sources>
>                <includes name="${source.dir}\*.vb" />
>                <includes name="${source.dir}\components\*.vb" />
>            </sources>
>
>            <references>
>                <includes asis="true" name="System.dll"/>
>                <includes asis="true" name="System.Data.dll"/>
>                <includes asis="true" name="System.Drawing.dll"/>
>                <includes asis="true" name="System.Web.dll"/>
>                <includes asis="true" name="System.XML.dll"/>
>                <includes asis="true" name="System.Windows.Forms.dll"/>
>                <includes asis="true" name="${source.dir}\bin\Common.dll" 
> />
>                <includes asis="true"
> name="${source.dir}\bin\EnumerationAssembly\EnumerationAssembly.dll" />
>            </references>
>        </vbc>
>    </target>
>
>
>    <target name="clean" description="Removes any files used during the
> build.">
>        <delete dir="${build.dir}" failonerror="false" />
>    </target>
>
>    <target name="all" depends="init,build,clean" />
> </project>
> 




-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to