Bug with TeamCity 7.0 EAP (20702)

Hi,

We are evaluating TeamCity 7.0 EAP (20702). We have migrated from 6.5.4 to 7.0 (20702) and no errors occurs in the migration process.

The web site is working well too, but our build fails with an error.
This error is internal to TeamCity because our NAnt scripts do their job to the end and everything is finally working well.

Failed to process MSBuild event: Microsoft.Build.Framework.TargetStartedEventArgs. Component JetBrains.BuildServer.MSBuildLoggers.Logging.MSBuildTargetLogger, JetBrains.BuildServer.MSBuildLoggers, Version=7.0.334.0, Culture=neutral, PublicKeyToken=49e678c3dd882e99 was not found
System.Exception: Component JetBrains.BuildServer.MSBuildLoggers.Logging.MSBuildTargetLogger, JetBrains.BuildServer.MSBuildLoggers, Version=7.0.334.0, Culture=neutral, PublicKeyToken=49e678c3dd882e99 was not found ---> JetBrains.Container.ComponentContainerException: Component JetBrains.BuildServer.MSBuildLoggers.Logging.MSBuildTargetLogger, JetBrains.BuildServer.MSBuildLoggers, Version=7.0.334.0, Culture=neutral, PublicKeyToken=49e678c3dd882e99 was not found
at JetBrains.Container.ComponentContainer.GetComponent(Type type) in c:\BuildAgent\work\6223f0c8b1d45aaa\src\JetContainer\src\ComponentContainer.cs:line 268
at JetBrains.BuildServer.MSBuildLoggers.Logging.Multicaster.FindService[T](MSBuildLoggingKey tid) in c:\BuildAgent\work\6223f0c8b1d45aaa\src\MSBuildLoggers\src\Logging\Multicaster.cs:line 50
--- End of inner exception stack trace ---
at JetBrains.BuildServer.MSBuildLoggers.Logging.Multicaster.FindService[T](MSBuildLoggingKey tid) in c:\BuildAgent\work\6223f0c8b1d45aaa\src\MSBuildLoggers\src\Logging\Multicaster.cs:line 54
at JetBrains.BuildServer.MSBuildLoggers.Logging.Multicaster.FindProcessor[T](BuildEventArgs args) in c:\BuildAgent\work\6223f0c8b1d45aaa\src\MSBuildLoggers\src\Logging\Multicaster.cs:line 32
at JetBrains.BuildServer.MSBuildLoggers.MSBuildLoggerImpl.<>c__DisplayClass13.<OnTargetStarted>b__12() in c:\BuildAgent\work\6223f0c8b1d45aaa\src\MSBuildLoggers\src\MSBuildLoggerImpl.cs:line 144
at JetBrains.BuildServer.MSBuildLoggers.MSBuildLoggerImpl.Catch(BuildEventArgs evt, Action a) in c:\BuildAgent\work\6223f0c8b1d45aaa\src\MSBuildLoggers\src\MSBuildLoggerImpl.cs:line 95

  • Failed to process MSBuild event: Microsoft.Build.Framework.TargetFinishedEventArgs. Component JetBrains.BuildServer.MSBuildLoggers.Logging.MSBuildTargetLogger, JetBrains.BuildServer.MSBuildLoggers, Version=7.0.334.0, Culture=neutral, PublicKeyToken=49e678c3dd882e99 was not found
    System.Exception: Component JetBrains.BuildServer.MSBuildLoggers.Logging.MSBuildTargetLogger, JetBrains.BuildServer.MSBuildLoggers, Version=7.0.334.0, Culture=neutral, PublicKeyToken=49e678c3dd882e99 was not found ---> JetBrains.Container.ComponentContainerException: Component JetBrains.BuildServer.MSBuildLoggers.Logging.MSBuildTargetLogger, JetBrains.BuildServer.MSBuildLoggers, Version=7.0.334.0, Culture=neutral, PublicKeyToken=49e678c3dd882e99 was not found
    at JetBrains.Container.ComponentContainer.GetComponent(Type type) in c:\BuildAgent\work\6223f0c8b1d45aaa\src\JetContainer\src\ComponentContainer.cs:line 268
    at JetBrains.BuildServer.MSBuildLoggers.Logging.Multicaster.FindService[T](MSBuildLoggingKey tid) in c:\BuildAgent\work\6223f0c8b1d45aaa\src\MSBuildLoggers\src\Logging\Multicaster.cs:line 50
    --- End of inner exception stack trace ---
    at JetBrains.BuildServer.MSBuildLoggers.Logging.Multicaster.FindService[T](MSBuildLoggingKey tid) in c:\BuildAgent\work\6223f0c8b1d45aaa\src\MSBuildLoggers\src\Logging\Multicaster.cs:line 54
    at JetBrains.BuildServer.MSBuildLoggers.Logging.Multicaster.FindProcessor[T](BuildEventArgs args) in c:\BuildAgent\work\6223f0c8b1d45aaa\src\MSBuildLoggers\src\Logging\Multicaster.cs:line 32
    at JetBrains.BuildServer.MSBuildLoggers.MSBuildLoggerImpl.<>c__DisplayClass10.<OnTargetFinished>b__f() in c:\BuildAgent\work\6223f0c8b1d45aaa\src\MSBuildLoggers\src\MSBuildLoggerImpl.cs:line 139
    at JetBrains.BuildServer.MSBuildLoggers.MSBuildLoggerImpl.Catch(BuildEventArgs evt, Action a) in c:\BuildAgent\work\6223f0c8b1d45aaa\src\MSBuildLoggers\src\MSBuildLoggerImpl.cs:line 95      
  • Failed to process MSBuild event: Microsoft.Build.Framework.ProjectFinishedEventArgs. Component JetBrains.BuildServer.MSBuildLoggers.Logging.MSBuildProjectLogger, JetBrains.BuildServer.MSBuildLoggers, Version=7.0.334.0, Culture=neutral, PublicKeyToken=49e678c3dd882e99 was not found
    System.Exception: Component JetBrains.BuildServer.MSBuildLoggers.Logging.MSBuildProjectLogger, JetBrains.BuildServer.MSBuildLoggers, Version=7.0.334.0, Culture=neutral, PublicKeyToken=49e678c3dd882e99 was not found ---> JetBrains.Container.ComponentContainerException: Component JetBrains.BuildServer.MSBuildLoggers.Logging.MSBuildProjectLogger, JetBrains.BuildServer.MSBuildLoggers, Version=7.0.334.0, Culture=neutral, PublicKeyToken=49e678c3dd882e99 was not found
    at JetBrains.Container.ComponentContainer.GetComponent(Type type) in c:\BuildAgent\work\6223f0c8b1d45aaa\src\JetContainer\src\ComponentContainer.cs:line 268
    at JetBrains.BuildServer.MSBuildLoggers.Logging.Multicaster.FindService[T](MSBuildLoggingKey tid) in c:\BuildAgent\work\6223f0c8b1d45aaa\src\MSBuildLoggers\src\Logging\Multicaster.cs:line 50
    --- End of inner exception stack trace ---
    at JetBrains.BuildServer.MSBuildLoggers.Logging.Multicaster.FindService[T](MSBuildLoggingKey tid) in c:\BuildAgent\work\6223f0c8b1d45aaa\src\MSBuildLoggers\src\Logging\Multicaster.cs:line 54
    at JetBrains.BuildServer.MSBuildLoggers.Logging.Multicaster.FindProcessor[T](BuildEventArgs args) in c:\BuildAgent\work\6223f0c8b1d45aaa\src\MSBuildLoggers\src\Logging\Multicaster.cs:line 32
    at JetBrains.BuildServer.MSBuildLoggers.MSBuildLoggerImpl.<>c__DisplayClass16.<OnProjectFinished>b__15() in c:\BuildAgent\work\6223f0c8b1d45aaa\src\MSBuildLoggers\src\MSBuildLoggerImpl.cs:line 150
    at JetBrains.BuildServer.MSBuildLoggers.MSBuildLoggerImpl.Catch(BuildEventArgs evt, Action a) in c:\BuildAgent\work\6223f0c8b1d45aaa\src\MSBuildLoggers\src\MSBuildLoggerImpl.cs:line 95      
  • Failed to process MSBuild event: Microsoft.Build.Framework.ProjectFinishedEventArgs. Component JetBrains.BuildServer.MSBuildLoggers.Logging.MSBuildProjectLogger, JetBrains.BuildServer.MSBuildLoggers, Version=7.0.334.0, Culture=neutral, PublicKeyToken=49e678c3dd882e99 was not found
    System.Exception: Component JetBrains.BuildServer.MSBuildLoggers.Logging.MSBuildProjectLogger, JetBrains.BuildServer.MSBuildLoggers, Version=7.0.334.0, Culture=neutral, PublicKeyToken=49e678c3dd882e99 was not found ---> JetBrains.Container.ComponentContainerException: Component JetBrains.BuildServer.MSBuildLoggers.Logging.MSBuildProjectLogger, JetBrains.BuildServer.MSBuildLoggers, Version=7.0.334.0, Culture=neutral, PublicKeyToken=49e678c3dd882e99 was not found
    at JetBrains.Container.ComponentContainer.GetComponent(Type type) in c:\BuildAgent\work\6223f0c8b1d45aaa\src\JetContainer\src\ComponentContainer.cs:line 268
    at JetBrains.BuildServer.MSBuildLoggers.Logging.Multicaster.FindService[T](MSBuildLoggingKey tid) in c:\BuildAgent\work\6223f0c8b1d45aaa\src\MSBuildLoggers\src\Logging\Multicaster.cs:line 50
    --- End of inner exception stack trace ---
    at JetBrains.BuildServer.MSBuildLoggers.Logging.Multicaster.FindService[T](MSBuildLoggingKey tid) in c:\BuildAgent\work\6223f0c8b1d45aaa\src\MSBuildLoggers\src\Logging\Multicaster.cs:line 54
    at JetBrains.BuildServer.MSBuildLoggers.Logging.Multicaster.FindProcessor[T](BuildEventArgs args) in c:\BuildAgent\work\6223f0c8b1d45aaa\src\MSBuildLoggers\src\Logging\Multicaster.cs:line 32
    at JetBrains.BuildServer.MSBuildLoggers.MSBuildLoggerImpl.<>c__DisplayClass16.<OnProjectFinished>b__15() in c:\BuildAgent\work\6223f0c8b1d45aaa\src\MSBuildLoggers\src\MSBuildLoggerImpl.cs:line 150
    at JetBrains.BuildServer.MSBuildLoggers.MSBuildLoggerImpl.Catch(BuildEventArgs evt, Action a) in c:\BuildAgent\work\6223f0c8b1d45aaa\src\MSBuildLoggers\src\MSBuildLoggerImpl.cs:line 95      
  • 12 comments
    Comment actions Permalink

    Thank you for report. Could you please describe what MSbuild you use, what toolsversion, what bitness?
    Do you have a small script to reproduce it?

    Do you use msbuild parallel building with /m commandline argument?

    If you use MSBuild 2.0, please give it a try running under MSBuild 3.5 or 4.0 (as workaround)

    0
    Comment actions Permalink

    Hi,

    We are using :
    - MsBuild 4.0
    - Bitness : AnyCPU
    - BuildInParallels : Yes

    We was usnig 6.5.4 before and we had a lot of logging failed messages in the teamcity logs, because we use the build in parallels feature, but the compilation build was successfull.
    Now, the build fails (even if Msbuild doesn't reports any errors) but most of logging message are gone.

    Below our NAnt compilation script:
    <msbuild project="${DirBranchSources}\All(no unittests, no setups).sln" target="Clean;Rebuild" verbosity="minimal" failonerror="true">
    <property name="Configuration" value="${CompilationMode}" />
    <property name="Platform" value="Any CPU" />
    <property name="Optimize" value="true" />
    <property name="BuildInParallel" value="true" />
    <arg line="/nologo" />
    <arg line="/noautoresponse" />
    <arg line="/fileLogger" />
    <arg line="/fileLoggerParameters:LogFile=&quot;${LogFileDetail}&quot;;Append;Verbosity=minimal;Encoding=UTF-8" />
    <arg value="/maxcpucount:${environment::get-variable('NUMBER_OF_PROCESSORS')}"/>
    </msbuild>

    The build computer has 8 CPU and the OS is Windows 2008 R2.

    Thanks

    Ps : I've attached the teamcity build log file.



    Attachment(s):
    Teamcity log.zip
    0
    Comment actions Permalink

    Thank you information. I try to reproduce the issue and come back to you.

    What kind of solution was it? How many projects were in it?

    0
    Comment actions Permalink

    Hi,

    In the log you get, there is 2 solutions, the first one (main one) contains 136 projects and there is no teamcity logging error, the errors always occurs in the 2nd solution, which is a VS 2010 solution (contains 29 projects) that builds a silverlight application.

    Error is always after : [msbuild] Web\SAM\OP.SEEK.SAM.sln.teamcity: Build target: TeamCity_Generated_Build
    Also, we always use two targets : Clean;Rebuild

    It seems the logging errors are always on the Clean target.

    Could it be because a file is in use ?
    It seems I get errors only when I run it on working hours ...
    This should never happens since application is never runs from the source build output (output files are copied to another folder outside of source folder).

    Thanks

    0
    Comment actions Permalink

    I prepared a patch for you.
    Please download
    ftp://ftp.intellij.net/pub/.teamcity/msbuild/dotNetPlugin.zip

    To apply patch, do the following:
    - open <teamcity installation path>/webapps/ROOT/WEB-INF/plugins/dotNetRunners/agent
    - backup original dotNetPlugin.zip to some other folder
    - put there downloaded file
    - wait a 3-5 minutes for build agents to autoupgrade
    - start the build once more.

    Do you see the issue reproducing?

    0
    Comment actions Permalink

    Hi,

    Thanks for the patch, I've run a build and I have no more logging errors,
    I can't confirm right now that the problems is gone forever because in the past (before the patch) I didn't have the error always ...

    I will confirm in the middle of the next week.

    Maybe can I have more information about what you changed ?

    Thanks a lot.

    0
    Comment actions Permalink

    Hi,

    I confirm that the problem is fixed, I did many test since I applied the patch and no error during this time.

    Thanks a lot

    0
    Comment actions Permalink

    Hi,

    Is this patch still available?  We run our builds in parallel and everything works fine except our logging fails. I have attached a sample of our build log as an example.  The link in the above post does not seem to work anymore and we are curently using TeamCity version 6.5.6.

    Cheers



    Attachment(s):
    build.PNG
    0
    Comment actions Permalink

    Multi-process msbuild run does not fully supported for 6.5.x builds. Please consider moving to 7.0 EAP (we plan to release 7.0 in the nearest future)

    0
    Comment actions Permalink

    Thanks Eugene, we shall wait for the release.

    Cheers

    0
    Comment actions Permalink

    Hi Will,

    Just to let you know, we have moved on 7.0 EAP since 20702 build and I have to say that this is very stable and migration from 6.5 was done without any problem too.

    0
    Comment actions Permalink

    Thanks for letting me know Dominique.

    0

    Please sign in to leave a comment.