English 中文(简体)
Error while Use of <exec> tag in NAnt
原标题:Error while Use of <exec> tag in NAnt
  • 时间:2011-10-04 12:40:49
  •  标签:
  • nant
<?xml version="1.0"?>
 <project name="Project" default="build">
 <property name="program" value="C:Program Files (x86)Microsoft Visual Studio 9.0VCvcvarsall.bat" />
 <property name="name.proj" value="C:projectproj.csproj" />
 <target name="build">
   <exec program="${program}"commandline="devenv.exe ${name.proj}"  />
 </target>
</project>

其产出为......。

Error in Script usage:The Correct usage is:C:Program Files (x86)Microsoft Visual
Studio 9.0VCvcvarsall.bat" [Option], where option= x86,ia64,or x86_ia64. 

但是,如果给予x86选择权,就再次出现错误。

请建议采取什么行动。

问题回答

页: 1

<exec program="${program}">
    <arg value="x86" />
</exec>

http://nant.sourceforge.net/release/0.85/help/tasks/exec.html> rel=“nofollow”>source

你们应当这样做:

<exec program="${program}" commandline="x86"  />

我不敢肯定,你为什么会把白天降为指挥线。 您也许希望在一项单独的任务中这样做。

这里是从科索沃统计局获得最新数据的一种EXEC样本。

<target name="getlatest" >
       <property name="path.cmd.exe" value="C:WINDOWSsystem32CMD.EXE"/>
          <property name="path.vss.bat" value="C:WorkuildDailyBuild
AntVSSGET.bat"/>

    <echo>
    -----------------------------------------------------------------------------------------------------------------
    -----------------------------------------------------------------------------------------------------------------
    TASK : GET LATEST FROM VSS
    -----------------------------------------------------------------------------------------------------------------
    -----------------------------------------------------------------------------------------------------------------
    </echo>
    <echo message="Task Start at: ${datetime::now()}" />

   <loadtasks assembly="nantcontrib-0.85/bin/NAnt.Contrib.Tasks.dll" />         

    <exec program="${path.cmd.exe}">
        <arg value="/C"  />     
        <arg value="${path.vss.bat}"  />
     </exec>
</target>




相关问题
Create directory using Nant

Not sure if I m just totally missing it but I couldn t not figure out how to create a new directory using Nant. Is there built in functionality to do this? Can I just use the command prompt? I tried ...

Setting write permissions on godaddy hosting

I have godaddy asp.net hosting. Every time I upload the build, it’s a manual laborious task of setting write permissions (to folders) through the web interface. Is this any way to automate this ...

What are solid NMaven or build servers for .NET alternatives?

Maven had a long history and is well supported in the Java world. NMaven has received a less successful start and has never become as popular in the C#/.NET world as its larger cousin was in the Java ...

Gallio and MbUnit in NAnt

I am trying to use Gallio (v3.1)/MbUnit/NCover to run a unit test in my C# code, as part of the build process for my continuous integration system. I can get Gallio.Echo.exe to execute the tests and ...

TeamCity NUnit test result visualisation

Is there any way to produce visual results of NUnit tests from within TeamCity s "Tests" tab, currently my NAnt script outputs an .xml file of the results using the following task: <nunit2 ...

building .net applications without Visual Studio

I m interested to hear about people working with building .net applications using MSBuild, NAnt or similar tools. What are you using, why are you using it instead of the VS IDE? I like to use ...

热门标签