I use
the basedir attribute of the <exec> task to specify the full path of the
devenv.com executable.
Here's
how I do it...
<property name="VS.devenv.path"
value="C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE"
/>
<property name="devenv.command" value="/build"/>
<property name="project.config" value="debug"/>
<property name="build.workdir" value="${project::get-base-directory()}"/>
<property name="devenv.command" value="/build"/>
<property name="project.config" value="debug"/>
<property name="build.workdir" value="${project::get-base-directory()}"/>
<target name="MyApp" depends=""
>
<exec program="devenv.com"
basedir="${VS.devenv.path}"
workingdir="${build.workdir}"
commandline='${target::get-current-target()}.vcproj ${devenv.command} "${project.config}" '/>
</target>
<exec program="devenv.com"
basedir="${VS.devenv.path}"
workingdir="${build.workdir}"
commandline='${target::get-current-target()}.vcproj ${devenv.command} "${project.config}" '/>
</target>
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dustin Aleksiuk
Sent: Tuesday, January 04, 2005 9:08 AM
To: nant-users@lists.sourceforge.net
Subject: [Nant-users] I'm unable to exec devenv using the <exec> task
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dustin Aleksiuk
Sent: Tuesday, January 04, 2005 9:08 AM
To: nant-users@lists.sourceforge.net
Subject: [Nant-users] I'm unable to exec devenv using the <exec> task
Hello,I'm trying to exec devenv.exe using the exec task. I know that there is a <solution> task, but it throws up errors that I don't get when building straight from devenv.exe. We've decided that we want to run from devenv.exe to make sure our CruiseControl build is totally consistent with our Visual Studio build.I hope that makes sense.Here's the exact problem: I don't know how to get the following path to run:D:\APPS\Microsoft Visual Studio .NET 2003\Common7\IDE\devenv.exeThe issue is with the "Microsoft Visual Studio .NET 2003" part of the path. I get an "Illegal characters in path" error message. I've tried escaping it in different ways and replacing it with Micros~3, but I get the same error no matter what. Actually, the Micros~3 gives a different error, but I think that the command window is choking on the same invalid characters, because "Micros~1" and "Micros~2" work fine.Any ideas?Thanks,Dustin Aleksiuk------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Nant-users mailing list Nant-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users