Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msbuild exception with latest bits #3868

Closed
sebastienros opened this issue Nov 7, 2019 · 15 comments · Fixed by dotnet/toolset#3487
Milestone

Comments

@sebastienros
Copy link

@sebastienros sebastienros commented Nov 7, 2019

With version 5.0.100-alpha1-015673 a project targeting netcoerapp5.0 builds
With version 5.0.100-alpha1-015678 I get

Microsoft (R) Build Engine version 16.5.0-preview-19554-02+d6c92f91b for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Restore completed in 1.22 sec for /tmp/BenchmarksServer/euax55k0.etz/src/PlatformBenchmarks.csproj.
MSBUILD : error MSB4017: The build stopped unexpectedly because of an unexpected logger failure.
Microsoft.Build.Exceptions.InternalLoggerException: The build stopped unexpectedly because of an unexpected logger failure.
 ---> System.ArgumentException: An item with the same key has already been added. Key: TargetFrameworkVersion
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
   at Microsoft.DotNet.Tools.MSBuild.MSBuildLogger.FormatAndSend(ITelemetry telemetry, TelemetryEventArgs args) in /_/src/dotnet/commands/dotnet-msbuild/MSBuildLogger.cs:line 98
   at Microsoft.DotNet.Tools.MSBuild.MSBuildLogger.OnTelemetryLogged(Object sender, TelemetryEventArgs args) in /_/src/dotnet/commands/dotnet-msbuild/MSBuildLogger.cs:line 114
   at Microsoft.Build.BackEnd.Logging.EventSourceSink.RaiseTelemetryEvent(Object sender, TelemetryEventArgs buildEvent)
   --- End of inner exception stack trace ---
   at Microsoft.Build.Exceptions.InternalLoggerException.Throw(Exception innerException, BuildEventArgs e, String messageResourceName, Boolean initializationException, String[] messageArgs)
   at Microsoft.Build.BackEnd.Logging.EventSourceSink.RaiseTelemetryEvent(Object sender, TelemetryEventArgs buildEvent)
   at Microsoft.Build.BackEnd.Logging.EventSourceSink.Consume(BuildEventArgs buildEvent)
   at Microsoft.Build.BackEnd.Logging.EventSourceSink.Consume(BuildEventArgs buildEvent, Int32 sinkId)
   at Microsoft.Build.BackEnd.Logging.EventRedirectorToSink.Microsoft.Build.Framework.IEventRedirector.ForwardEvent(BuildEventArgs buildEvent)
   at Microsoft.DotNet.Tools.MSBuild.MSBuildForwardingLogger.<Initialize>b__16_0(Object sender, TelemetryEventArgs args) in /_/src/dotnet/commands/dotnet-msbuild/MSBuildForwardingLogger.cs:line 23
   at Microsoft.Build.BackEnd.Logging.EventSourceSink.RaiseTelemetryEvent(Object sender, TelemetryEventArgs buildEvent)
@livarcocc

This comment has been minimized.

Copy link
Member

@livarcocc livarcocc commented Nov 7, 2019

@wli3 can you take a look?

@livarcocc livarcocc added this to the Discussion milestone Nov 7, 2019
@wli3

This comment has been minimized.

Copy link
Collaborator

@wli3 wli3 commented Nov 7, 2019

this should be fixed by dotnet/cli#12899

it is in 3.0 servicing

@wli3 wli3 closed this Nov 7, 2019
@sebastienros

This comment has been minimized.

Copy link
Author

@sebastienros sebastienros commented Nov 7, 2019

But it started happening yesterday afternoon, and it's still happening, on the 5.0 alpha versions. While the issue as been closed 21 days ago.

All our benchmarks are currently broken. Do you think it will stay like this for the foreseeable future then?

@wli3 wli3 reopened this Nov 7, 2019
@wli3

This comment has been minimized.

Copy link
Collaborator

@wli3 wli3 commented Nov 7, 2019

could you paste the result of dotnet --info here? i try to see if it has the change

@sebastienros

This comment has been minimized.

Copy link
Author

@sebastienros sebastienros commented Nov 7, 2019

Another explanation might be that the telemetry started to run due to an unrelated change on our systems, and the issue is now visible. Though I am pretty sure I didn't change our default settings that disable it.

At the same time, I can't repro with a previous version of the sdk. And we take them as they are released, so yesterday morning telemetry was disabled correctly, but not at the end of the day.

Aren't the version numbers I shared sufficient instead of doing a --version ?

With version 5.0.100-alpha1-015673 a project targeting netcoerapp5.0 builds
With version 5.0.100-alpha1-015678 I get

@wli3

This comment has been minimized.

Copy link
Collaborator

@wli3 wli3 commented Nov 7, 2019

It will speed up the investigation

@sebastienros

This comment has been minimized.

Copy link
Author

@sebastienros sebastienros commented Nov 7, 2019

OK

In the meantime:

The error message says that "TargetFrameworkVersion" is already in the dictionary. And the commit you did from yesterday, which matches the timeframe of the issue, adds it: d8ef7ef

@wli3

This comment has been minimized.

Copy link
Collaborator

@wli3 wli3 commented Nov 7, 2019

Yes. I think I find the issue. There is a duplicated key

@heng-liu

This comment has been minimized.

Copy link

@heng-liu heng-liu commented Nov 7, 2019

Hi @wli3 , the results of dotnet --info is as following:

5.0.100-alpha1-015681
.NET Core SDK (reflecting any global.json):
 Version:   5.0.100-alpha1-015681
 Commit:    7488dc6788

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  16.04
 OS Platform: Linux
 RID:         ubuntu.16.04-x64
 Base Path:   /home/dditadministrator/myagent/_work/_temp/dotnet/sdk/5.0.100-alpha1-015681/

Host (useful for support):
  Version: 5.0.0-alpha.1.19555.5
  Commit:  3abe982e79

.NET Core SDKs installed:
  5.0.100-alpha1-015681 [/home/dditadministrator/myagent/_work/_temp/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.App 5.0.0-alpha1.19554.3 [/home/dditadministrator/myagent/_work/_temp/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 5.0.0-alpha.1.19555.5 [/home/dditadministrator/myagent/_work/_temp/dotnet/shared/Microsoft.NETCore.App]
@wli3

This comment has been minimized.

Copy link
Collaborator

@wli3 wli3 commented Nov 7, 2019

thanks!

@heng-liu

This comment has been minimized.

Copy link

@heng-liu heng-liu commented Nov 8, 2019

Hi @wli3, thanks for solving this issue! May I know when can I get the latest fixed SDK? Can I get latest updates if I install SDK by command : dotnet-install.sh -c master ? Thanks!

@filipnavara

This comment has been minimized.

Copy link

@filipnavara filipnavara commented Nov 8, 2019

Can we please keep this issue open until the new SDK nightlies are available?

Fixed now in the nightlies.

@wli3

This comment has been minimized.

Copy link
Collaborator

@wli3 wli3 commented Nov 12, 2019

@heng-liu core-sdk build now has the fix

@sebastienros

This comment has been minimized.

Copy link
Author

@sebastienros sebastienros commented Nov 12, 2019

Confirmed, thanks @wli3

@heng-liu

This comment has been minimized.

Copy link

@heng-liu heng-liu commented Nov 13, 2019

Thanks! @wli3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.