5

i'm in the process or upgrading my CI configuration to Web Deployment projects 2010 (from 2008)

i'm geting a really strange issue durin build as shown below - i've been looking into it a a few hours to no resolve, and am starting to think the issue is elsewhere...)

C:\Program Files (x86)\MSBuild\Microsoft\WebDeployment\v10.0\Microsoft.WebDeployment.targets(103, 46): error MSB4092: An unexpected token ")" was found at character position 174 in condition "'$(_ExcludeWAPBaseIntermediateOutputPath)' == '' And !$([System.IO.Path]::IsPathRooted($(_ExcludeWAPBaseIntermediateOutputPath)))".

Ruben Bartelink
  • 59,778
  • 26
  • 187
  • 249
Doug
  • 6,460
  • 5
  • 59
  • 83

5 Answers5

10

I was also facing the same issue. Resolved by using correct tool version for MSBuild which is 4.0

<tasks>
  <msbuild>
    <executable>**C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe**</executable>
    <workingDirectory></workingDirectory>
    <projectFile></projectFile>
    <buildArgs>/noconsolelogger </buildArgs>
    <targets>RunFxcop</targets>
    <logger>C:\Program Files\CruiseControl.NET\Server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
    <timeout>3600</timeout>
  </msbuild>
</tasks>
agf
  • 171,228
  • 44
  • 289
  • 238
Deepak A
  • 101
  • 3
1

Out of the blue, I think that your CI server doesn't use MSBuild to run the Build, so the property function $([System.IO.Path]::IsPathRooted(...) is not recognized.

Check that MSBuild 4 is the version used by your CI server.

Julien Hoarau
  • 48,964
  • 20
  • 128
  • 117
0

I was using Nant on an old solution and needed to set the Fx version in nant

<property name="nant.settings.currentframework" value="net-4.0" />
fiat
  • 15,501
  • 9
  • 81
  • 103
0

Although i had selected to use MSBUILD version 4 and the MSBUILD tools 4.0 it still failed - upon upgrading to the latest version of TeamCity all the issues went away :)

Doug
  • 6,460
  • 5
  • 59
  • 83
0

If you are using a Visual Studio command prompt to run MSBuild, make sure that it is a "Visual Studio Command Prompt (2010)"

user281806
  • 1,020
  • 9
  • 14
  • i specified in the question and my answer that i was using MSBUILD – Doug Feb 24 '11 at 00:37
  • I meant msbuild should be run from the appropriate Visual Studio Command Prompt. If you accidentally run a VS 2008 command prompt instead of 2010, you will get MSBUILD 3, and strange errors will occur. – user281806 May 18 '11 at 23:42