【问题标题】:Error in Attribute value of build xml构建 xml 的属性值错误
【发布时间】:2012-02-22 13:56:38
【问题描述】:

我收到以下代码的错误:

 <?xml version="1.0"?>
<!--
***************Demo.build******************
-->

<project name="Mybuild">
<include buildfile="config.xml" />

 <target name="build_my_solution">
 <mkdir dir="C:\Done" />
 <exec program="${NAntBuildPath}" output="${dir}>
  <arg line="${solution_file}" >
  <arg line="/property:Configuration=Release;AllowUnsafeBlocks=true" />
  <arg value="/target:Rebuild" />
  <arg value="/verbosity:normal" />
  <arg value="/nologo" />
  <arg value="/maxcpucount:2" /> 

  </exec>
  </target>
  </project>

错误(在 Internet Explorer 中):字符“

-^

【问题讨论】:

    标签: xml build-automation nant


    【解决方案1】:

    exec 元素中缺少右引号。应该是

    <exec program="${NAntBuildPath}" output="${dir}"> 
    

    此外,以下 arg 元素未正确关闭。应该是

    <arg line="${solution_file}" />
    

    如果您进行这两项更改,您应该会得到格式良好的 XML。

    【讨论】:

      猜你喜欢
      • 2019-01-29
      • 1970-01-01
      • 1970-01-01
      • 2017-01-15
      • 1970-01-01
      • 2023-04-06
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多