You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Edward Gemar <eg...@forwardvue.com> on 2002/04/16 17:38:03 UTC

Building C# projects using Ant

Hi all,
            The project I am working on has a J2EE server component and
.Net C# client.  We have the Java server components building and
deploying fine using ant and now need to automate the build of our C#
client.  I know there are .Net optional Ant tasks, but they don't seem
to do what we need.  We would like to be able to just point to our
existing Visual Studio solution and project files and have them build
correctly.  Currently, we are using the VS devenv.exe tool with the
proper command line switches to this manually.
            There is an environment variable VSCOMNTOOLS that Visual
Studio sets up that in theory we can use to point to the devenv.exe
location.  The problem is that the path set in VSCOMNTOOLS is quoted and
does not point directly to the devenv.exe location.  i.e. -
VSCOMNTOOLS="C:\Program Files\Microsoft Visual Studio
.NET\Common7\Tools\"  Ant barfs if you try to add a relative path to a
path that is quoted i.e. "C:\Program Files\Microsoft Visual Studio
.NET\Common7\Tools\"..\IDE 
            So the question is:  Is there a better way to build VS .Net
projects using Ant?  If not is there an easy way to strip the quotes
from a path or property?  That will solve our problem if there is a way
to do it because then it is trivial to build a path to the devenv.exe
and invoke it using the <exec> task.
 
            Thanks
 
Edward Gemar
ForwardVue Technologies, Inc.
Austin, TX
Vox: 512-482-5126
Fax: 512-651-3209
 

Re: Building C# projects using Ant

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Edward Gemar" <eg...@forwardvue.com>
To: <an...@jakarta.apache.org>
Sent: Tuesday, April 16, 2002 8:38 AM
Subject: Building C# projects using Ant


> Hi all,
>             The project I am working on has a J2EE server component and
> .Net C# client.  We have the Java server components building and
> deploying fine using ant and now need to automate the build of our C#
> client.  I know there are .Net optional Ant tasks, but they don't seem
> to do what we need.

...you can add more, and since last CSC added dependency checking. There is
also a WsdlToDotnet task to generate CS code from a WSDL File

>  We would like to be able to just point to our
> existing Visual Studio solution and project files and have them build
> correctly.  Currently, we are using the VS devenv.exe tool with the
> proper command line switches to this manually.
>             There is an environment variable VSCOMNTOOLS that Visual
> Studio sets up that in theory we can use to point to the devenv.exe
> location.  The problem is that the path set in VSCOMNTOOLS is quoted and
> does not point directly to the devenv.exe location.  i.e. -
> VSCOMNTOOLS="C:\Program Files\Microsoft Visual Studio
> .NET\Common7\Tools\"  Ant barfs if you try to add a relative path to a
> path that is quoted i.e. "C:\Program Files\Microsoft Visual Studio
> .NET\Common7\Tools\"..\IDE

Add devenv to the path, or point to in a properties file

>             So the question is:  Is there a better way to build VS .Net
> projects using Ant?  If not is there an easy way to strip the quotes
> from a path or property?  That will solve our problem if there is a way
> to do it because then it is trivial to build a path to the devenv.exe
> and invoke it using the <exec> task.

See nant on sourceforge for a net version of ant; call nant from ant for the
C# side of things.

if you delegate to devenv, then you have IDE maintenance/portability issues
to go with your ant file.




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>