This Question is Assumed Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
5 Replies Last post: Jun 7, 2010 4:24 PM by Eugene Petrenko  
Julian Simpson Newbie 2 posts since
Oct 21, 2008
Currently Being Moderated

Oct 21, 2008 10:02 PM

Nant build that calls MSBuild: works via command runner but not via Nant?

Hi,

 

I'm building an existing project via a Nant build, which invokes the Nant-contrib msbuild task to compile individual assembly .csproj files.

 

I can make it all compile when I use the Command Line runner to invoke Nant.  When I use the Nant runner to invoke Nant, it behaves differently:

 

-


 

18:11:06: Complete build sequence is some list of targets

18:11:06: msbuild (12s)

18:11:06: msbuild Starting MSBuild...

18:11:06: msbuild Starting 'c:\WINDOWS\Microsoft.NET\Framework\v3.5\msbuild.exe (@"D:\work\projects\MyProject\trunk\Assemblies\MyProject.Core\MyProject.Core.csproj.teamcity.msbuild.tcargs")' in 'D:\work\projects\MyProject\trunk'

18:11:07: msbuild Project "MyProject.Core.csproj.teamcity.patch.tcprojx" (default targets): (10s)

18:11:07: [Project "MyProject.Core.csproj.teamcity.patch.tcprojx" (default targets):] Building with tools version "2.0".

18:11:07: [Project "MyProject.Core.csproj.teamcity.patch.tcprojx" (default targets):] Target "_CheckForInvalidConfigurationAndPlatform" in project "MyProject.Core.csproj.teamcity.patch.tcprojx" (<1s)

18:11:07: [Target "_CheckForInvalidConfigurationAndPlatform" in project "MyProject.Core.csproj.teamcity.patch.tcprojx"] Task "Error" skipped, due to false condition; ( '$(_InvalidConfigurationError)' == 'true' ) was evaluated as ( '' == 'true' ).

18:11:07: [Target "_CheckForInvalidConfigurationAndPlatform" in project "MyProject.Core.csproj.teamcity.patch.tcprojx"] Task "Warning" skipped, due to false condition; ( '$(_InvalidConfigurationWarning)' == 'true' ) was evaluated as ( '' == 'true' ).

18:11:07: [Target "_CheckForInvalidConfigurationAndPlatform" in project "MyProject.Core.csproj.teamcity.patch.tcprojx"] Using "Message" task from assembly "Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".

18:11:07: [Target "_CheckForInvalidConfigurationAndPlatform" in project "MyProject.Core.csproj.teamcity.patch.tcprojx"] Configuration=Debug

-


 

What are the tcproxj and tcargs files for?  It looks to me like this bevahiour shouldn't be taking place.

 

Running  TeamCity Professional Version 3.1.2 (build 6881) 

 

Thanks

 

Julian

Eugene Petrenko JetBrains 2,377 posts since
Oct 4, 2004
Currently Being Moderated
Oct 22, 2008 12:39 PM in response to: Julian Simpson
Re: Nant build that calls MSBuild: works via command runner but not via Nant?

TeamCity replaces call to task in your build script. Thanks!

Eugene Petrenko JetBrains 2,377 posts since
Oct 4, 2004
Currently Being Moderated
Oct 22, 2008 2:24 PM in response to: Julian Simpson
Re: Nant build that calls MSBuild: works via command runner but not via Nant?

You may select .NET 3.5 as your target framework or set 'teamcity_dotnet_use_msbuild_v35' NAnt property

 

Thanks!

Matt Brock Newbie 1 posts since
Jun 2, 2010
Currently Being Moderated
Jun 2, 2010 1:19 AM in response to: Julian Simpson
Re: Nant build that calls MSBuild: works via command runner but not via Nant?

I am having the same problem now because my project was built with VS 2010 and needs msbuild 4. Is there a way to tell team city to not replace my calls to msbuild? Is there a way to tell Team City to use msbuild 4?

Eugene Petrenko JetBrains 2,377 posts since
Oct 4, 2004
Currently Being Moderated
Jun 7, 2010 4:24 PM in response to: Matt Brock
Re: Nant build that calls MSBuild: works via command runner but not via Nant?

You may set NAnt target framework to 'net-4.0' (you will need to patch NAnt.exe.Config file to make it support .NET 4.0)

or

set 'teamcity_dotnet_tools_version' NAnt property with value '4.0'.

More Like This

  • Retrieving data ...