使用msbuild在Nant脚本中构建,因为破折号而导致错误

时间:2015-03-31 15:27:52

标签: msbuild nant

我使用Nant构建脚本,使用msbuild构建我的项目。问题是,我的解决方案被称为"某事 - something.sln"而且由于空间和破折号而导致错误。 如何在不更改解决方案的情况下解决此问题?

我的Nant脚本:

   <property name="solution.name"       value="Account – Bulk Process.sln" />    

   <property name="build.item" value="${build.dir}\${solution.name}" />
    <property name="config.type"        value="Debug" />
    <property name="target"                 value="clean" />
    <msbuild project="${build.item}" target="${target}" verbose="${verbose}" failonerror="true">
      <property name="Configuration" value="${config.type}" verbose="${verbose}" />
    </msbuild>

错误:

[echo] Task execution started at : 01/04/2015 14:55:18
 [echo] Task execution finished at : 01/04/2015 14:55:18
  [msbuild] Starting MSBuild...
  [msbuild] Starting 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe (@"C:\Users\...")' in 'C:\Dev\Teley\Account – Bulk Process'
  [msbuild] MSBUILD : error MSB1009: Project file does not exist.
  [msbuild] Switch: C:\Dev\Teley\Account ƒ?" Bulk Process.sln

0 个答案:

没有答案