This is the standard behaviour for the csc compiler and in fact for every .net compiler. There can only be a single static Main method in a given .exe assembly otherwise the runtime will not know which one to execute at startup. Remove or rename one of the Main methods and it will work fine.

Ian

Has anyone run into a problem building a class the has multiple entry
points into it with nant? Is there a way to get around this with the
<csc> task?

Thanks,
Mike.

Here is the output I am getting from nant:

BUILD FAILED
D:\dotNet\nAnt\Projects\ItemSetup\ide\nant\nant.build(69,6):External
Program Failed: C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\csc.exe
return 1
Output:
D:\dotNet\nAnt\Projects\ItemSetup\dev\src\ItemSetup\Form1.cs(52,15):
error CS0017: Program
'D:\dotNet\nAnt\Projects\ItemSetup\build\lib\ItemSetup.exe' has more
than one entry point defined: 'ItemSetup.Form1.Main()'
D:\dotNet\nAnt\Projects\ItemSetup\dev\src\ItemSetup\ItemSetupForm.cs(237
,15): error CS0017: Program
'D:\dotNet\nAnt\Projects\ItemSetup\build\lib\ItemSetup.exe' has more
than one entry point defined: 'ItemSetup.ItemSetupForm.Main()'




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to