You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Bryan Urteaga <to...@yahoo.com> on 2003/03/12 22:59:20 UTC

with Many Files

Hello All,

When I try to compile C# code using the <csc> task, I
get the following error message:

   [csc] The following character string is too long:
   [csc]  /nologo /debug- /incremental-
/main:view.SPSContainer /optimize-
/reference:System.Data.dll;System.dll;Syst
em.XML.dll;mscorlib.dll;dataobjects.dll;model.dll;System.Drawing.dll;System.Web.dll;System.Web.Services.dll;System.Windo
ws.Forms.dll /target:winexe
/warchangeControl\ChangeControlServiceDelegator.cs
C:\DATA\Indeliq\build\R2\spseditor\build\
src\view\controllerfactories\changeControl\ChangeControlServiceLocal.cs
**snip**

The remainder of the "long string" is a truncated
space delimited list of each file to be compiled. My
suspicion is that there is a character limit on the
Windows command shell. Any help with resolving this
issue would be appreciated. Thanks in advance. Below
is a snippet of the build file:

   <target name="compileView" depends="compileModel">
      <csc
         debug="false"
         includeDefaultReferences="false"
        
references="System.Data.dll;System.dll;System.XML.dll;mscorlib.dll;dataobjects.dll;model.dll;System.Drawing.dll;System.Web.dll;System.Web.Services.dll;System.Windows.Forms.dll"
         destfile="spseditor.exe"
         mainClass="view.SPSContainer"
         targetType="winexe"
        
extraOptions="/resource:view.SystemStrings.resource"
         srcDir=".\src\view"
      />
   </target>

Personally, I think the <csc> task should somehow use
the option, "/recurse:*.cs" if the attribute
"includes" is not implicitly defined.

----------
Bryan Urteaga

__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

Re: with Many Files

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Bryan Urteaga" <to...@yahoo.com>
To: <us...@ant.apache.org>
Sent: Wednesday, March 12, 2003 13:59
Subject: <csc> with Many Files


> Hello All,
>
> When I try to compile C# code using the <csc> task, I
> get the following error message:
>
>    [csc] The following character string is too long:
>    [csc]  /nologo /debug- /incremental-
> /main:view.SPSContainer /optimize-
> /reference:System.Data.dll;System.dll;Syst
>
em.XML.dll;mscorlib.dll;dataobjects.dll;model.dll;System.Drawing.dll;System.
Web.dll;System.Web.Services.dll;System.Windo
> ws.Forms.dll /target:winexe
> /warchangeControl\ChangeControlServiceDelegator.cs
> C:\DATA\Indeliq\build\R2\spseditor\build\
> src\view\controllerfactories\changeControl\ChangeControlServiceLocal.cs
> **snip**
>
> The remainder of the "long string" is a truncated
> space delimited list of each file to be compiled. My
> suspicion is that there is a character limit on the
> Windows command shell.

WinNT or win9x?


> Personally, I think the <csc> task should somehow use
> the option, "/recurse:*.cs" if the attribute
> "includes" is not implicitly defined.

Or have the task generate an @response file with all the options and do it
that way -so you can handle complex trees even if things are excluded or
included.

You can file a bug on this, but I dont expect it to be fixed unless you
contribute. There arent enough .NET users working on it, only two, and I've
just done enough on the tasks for 1.6, now I'm looking at other problem
areas (like SCM and SQL).

If you do want to work on the .NET stuff, get the latest from CVS source,
which has

-multiple <src> filesets
-<reference> filesets for including references...included in dependency
checking
-<define> element for definitions, these have if and unless attributes for
conditional control from ant.

+some other tweaks. Its very different under the hood from the 1.5 version,
sharing much code with the new vbc and jsharp tasks