Test run for D:\a\opentelemetry-dotnet-contrib\opentelemetry-dotnet-contrib\artifacts\bin\OpenTelemetry.Extensions.Enrichment.Tests\release_net462\OpenTelemetry.Extensions.Enrichment.Tests.dll (.NETFramework,Version=v4.6.2)
A total of 1 test files matched the specified pattern.
D:\a\opentelemetry-dotnet-contrib\opentelemetry-dotnet-contrib\artifacts\bin\OpenTelemetry.Extensions.Enrichment.Tests\release_net462\OpenTelemetry.Extensions.Enrichment.Tests.dll
Failed to load extensions from file 'C:\Program Files\dotnet\sdk\10.0.300\Extensions\Microsoft.Diagnostics.NETCore.Client.dll'. Please use /diag for more information.
Failed to load extensions from file 'C:\Program Files\dotnet\sdk\10.0.300\Extensions\Microsoft.TestPlatform.Extensions.BlameDataCollector.dll'. Please use /diag for more information.
Failed to load extensions from file 'C:\Program Files\dotnet\sdk\10.0.300\Extensions\Microsoft.TestPlatform.Extensions.EventLogCollector.dll'. Please use /diag for more information.
Failed to load extensions from file 'C:\Program Files\dotnet\sdk\10.0.300\Extensions\Microsoft.TestPlatform.TestHostRuntimeProvider.dll'. Please use /diag for more information.
Failed to load extensions from file 'C:\Program Files\dotnet\sdk\10.0.300\Extensions\Microsoft.VisualStudio.TestPlatform.Extensions.Html.TestLogger.dll'. Please use /diag for more information.
Failed to load extensions from file 'C:\Program Files\dotnet\sdk\10.0.300\Extensions\Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger.dll'. Please use /diag for more information.
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET Framework 4.8.9325.0)
[xUnit.net 00:00:00.70] Discovering: OpenTelemetry.Extensions.Enrichment.Tests
[xUnit.net 00:00:00.83] Discovered: OpenTelemetry.Extensions.Enrichment.Tests
[xUnit.net 00:00:00.84] Starting: OpenTelemetry.Extensions.Enrichment.Tests
Passed OpenTelemetry.Tests.StrongNameTests.Tests_Are_Strong_Named [90 ms]
Passed OpenTelemetry.Extensions.Enrichment.Tests.EventSourceTests.EventSourceTests_EnrichmentEventSource [121 ms]
[xUnit.net 00:00:01.84] OpenTelemetry.Extensions.Enrichment.Tests.OpenTelemetryEnrichmentServiceCollectionExtensionsTests.GenericMethod_TRegistersEnricher [FAIL]
[xUnit.net 00:00:01.84] System.IO.FileLoadException : Could not load file or assembly 'System.Diagnostics.DiagnosticSource, Version=8.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. Method does not exist. (Exception from HRESULT: 0x80131513)
[xUnit.net 00:00:01.84] ---- System.MissingMethodException : Method not found: 'System.Reflection.Assembly Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.Interfaces.AssemblyResolveEventArgs.get_RequestingAssembly()'.
[xUnit.net 00:00:01.84] Stack Trace:
[xUnit.net 00:00:01.84] at Microsoft.Extensions.Hosting.HostBuilder.Build()
[xUnit.net 00:00:01.84] /_/test/OpenTelemetry.Extensions.Enrichment.Tests/OpenTelemetryEnrichmentServiceCollectionExtensionsTests.cs(24,0): at OpenTelemetry.Extensions.Enrichment.Tests.OpenTelemetryEnrichmentServiceCollectionExtensionsTests.<GenericMethod_TRegistersEnricher>d__1.MoveNext()
[xUnit.net 00:00:01.84] --- End of stack trace from previous location where exception was thrown ---
[xUnit.net 00:00:01.84] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[xUnit.net 00:00:01.84] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[xUnit.net 00:00:01.84] --- End of stack trace from previous location where exception was thrown ---
[xUnit.net 00:00:01.84] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[xUnit.net 00:00:01.84] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[xUnit.net 00:00:01.84] --- End of stack trace from previous location where exception was thrown ---
[xUnit.net 00:00:01.84] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[xUnit.net 00:00:01.84] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[xUnit.net 00:00:01.84] ----- Inner Stack Trace -----
[xUnit.net 00:00:01.84] at Microsoft.VisualStudio.TestPlatform.Common.Utilities.AssemblyResolver.OnResolve(Object sender, AssemblyResolveEventArgs args)
[xUnit.net 00:00:01.84] at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)
[xUnit.net 00:00:01.84] OpenTelemetry.Extensions.Enrichment.Tests.OpenTelemetryEnrichmentServiceCollectionExtensionsTests.FactoryMethod_RegistersEnricher [FAIL]
[xUnit.net 00:00:01.84] System.MissingMethodException : Method not found: 'System.Reflection.Assembly Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.Interfaces.AssemblyResolveEventArgs.get_RequestingAssembly()'.
[xUnit.net 00:00:01.84] OpenTelemetry.Extensions.Enrichment.Tests.OpenTelemetryEnrichmentServiceCollectionExtensionsTests.InstanceMethod_SwallowsExceptionsFromEnrichOnActivityStart [FAIL]
[xUnit.net 00:00:01.84] OpenTelemetry.Extensions.Enrichment.Tests.OpenTelemetryEnrichmentServiceCollectionExtensionsTests.InstanceMethod_RegistersEnricher [FAIL]
[xUnit.net 00:00:01.84] Stack Trace:
[xUnit.net 00:00:01.84] at Microsoft.Extensions.Hosting.HostBuilder.Build()
[xUnit.net 00:00:01.84] /_/test/OpenTelemetry.Extensions.Enrichment.Tests/OpenTelemetryEnrichmentServiceCollectionExtensionsTests.cs(152,0): at OpenTelemetry.Extensions.Enrichment.Tests.OpenTelemetryEnrichmentServiceCollectionExtensionsTests.<FactoryMethod_RegistersEnricher>d__4.MoveNext()
[xUnit.net 00:00:01.84] --- End of stack trace from previous location where exception was thrown ---
[xUnit.net 00:00:01.84] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[xUnit.net 00:00:01.84] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[xUnit.net 00:00:01.84] --- End of stack trace from previous location where exception was thrown ---
[xUnit.net 00:00:01.84] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[xUnit.net 00:00:01.84] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[xUnit.net 00:00:01.84] --- End of stack trace from previous location where exception was thrown ---
[xUnit.net 00:00:01.84] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[xUnit.net 00:00:01.84] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[xUnit.net 00:00:01.84] System.MissingMethodException : Method not found: 'System.Reflection.Assembly Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.Interfaces.AssemblyResolveEventArgs.get_RequestingAssembly()'.
[xUnit.net 00:00:01.84] Stack Trace:
[xUnit.net 00:00:01.84] at Microsoft.Extensions.Hosting.HostBuilder.Build()
[xUnit.net 00:00:01.84] /_/test/OpenTelemetry.Extensions.Enrichment.Tests/OpenTelemetryEnrichmentServiceCollectionExtensionsTests.cs(284,0): at OpenTelemetry.Extensions.Enrichment.Tests.OpenTelemetryEnrichmentServiceCollectionExtensionsTests.<InstanceMethod_SwallowsExceptionsFromEnrichOnActivityStart>d__7.MoveNext()
[xUnit.net 00:00:01.84] --- End of stack trace from previous location where exception was thrown ---
[xUnit.net 00:00:01.84] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[xUnit.net 00:00:01.84] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[xUnit.net 00:00:01.84] --- End of stack trace from previous location where exception was thrown ---
[xUnit.net 00:00:01.84] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[xUnit.net 00:00:01.84] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[xUnit.net 00:00:01.84] --- End of stack trace from previous location where exception was thrown ---
[xUnit.net 00:00:01.84] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[xUnit.net 00:00:01.84] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[xUnit.net 00:00:01.84] System.MissingMethodException : Method not found: 'System.Reflection.Assembly Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.Interfaces.AssemblyResolveEventArgs.get_RequestingAssembly()'.
[xUnit.net 00:00:01.84] Stack Trace:
[xUnit.net 00:00:01.84] at Microsoft.Extensions.Hosting.HostBuilder.Build()
[xUnit.net 00:00:01.84] /_/test/OpenTelemetry.Extensions.Enrichment.Tests/OpenTelemetryEnrichmentServiceCollectionExtensionsTests.cs(72,0): at OpenTelemetry.Extensions.Enrichment.Tests.OpenTelemetryEnrichmentServiceCollectionExtensionsTests.<InstanceMethod_RegistersEnricher>d__2.MoveNext()
[xUnit.net 00:00:01.84] --- End of stack trace from previous location where exception was thrown ---
[xUnit.net 00:00:01.84] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[xUnit.net 00:00:01.84] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[xUnit.net 00:00:01.84] --- End of stack trace from previous location where exception was thrown ---
[xUnit.net 00:00:01.84] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[xUnit.net 00:00:01.84] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[xUnit.net 00:00:01.85] OpenTelemetry.Extensions.Enrichment.Tests.OpenTelemetryEnrichmentServiceCollectionExtensionsTests.DelegateMethod_RegistersEnricher [FAIL]
[xUnit.net 00:00:01.85] OpenTelemetry.Extensions.Enrichment.Tests.OpenTelemetryEnrichmentServiceCollectionExtensionsTests.InstanceMethod_SwallowsExceptionsFromEnrich [FAIL]
[xUnit.net 00:00:01.85] OpenTelemetry.Extensions.Enrichment.Tests.OpenTelemetryEnrichmentServiceCollectionExtensionsTests.DelegateMethod_SwallowsExceptionsFromEnrichmentActions [FAIL]
[xUnit.net 00:00:01.84] --- End of stack trace from previous location where exception was thrown ---
[xUnit.net 00:00:01.84] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[xUnit.net 00:00:01.85] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[xUnit.net 00:00:01.85] System.MissingMethodException : Method not found: 'System.Reflection.Assembly Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.Interfaces.AssemblyResolveEventArgs.get_RequestingAssembly()'.
[xUnit.net 00:00:01.85] Stack Trace:
[xUnit.net 00:00:01.85] at Microsoft.Extensions.Hosting.HostBuilder.Build()
[xUnit.net 00:00:01.85] /_/test/OpenTelemetry.Extensions.Enrichment.Tests/OpenTelemetryEnrichmentServiceCollectionExtensionsTests.cs(118,0): at OpenTelemetry.Extensions.Enrichment.Tests.OpenTelemetryEnrichmentServiceCollectionExtensionsTests.<DelegateMethod_RegistersEnricher>d__3.MoveNext()
[xUnit.net 00:00:01.85] --- End of stack trace from previous location where exception was thrown ---
[xUnit.net 00:00:01.85] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[xUnit.net 00:00:01.85] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[xUnit.net 00:00:01.85] --- End of stack trace from previous location where exception was thrown ---
[xUnit.net 00:00:01.85] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[xUnit.net 00:00:01.85] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[xUnit.net 00:00:01.85] --- End of stack trace from previous location where exception was thrown ---
[xUnit.net 00:00:01.85] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[xUnit.net 00:00:01.85] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[xUnit.net 00:00:01.85] System.MissingMethodException : Method not found: 'System.Reflection.Assembly Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.Interfaces.AssemblyResolveEventArgs.get_RequestingAssembly()'.
[xUnit.net 00:00:01.85] Stack Trace:
[xUnit.net 00:00:01.85] at Microsoft.Extensions.Hosting.HostBuilder.Build()
[xUnit.net 00:00:01.85] /_/test/OpenTelemetry.Extensions.Enrichment.Tests/OpenTelemetryEnrichmentServiceCollectionExtensionsTests.cs(239,0): at OpenTelemetry.Extensions.Enrichment.Tests.OpenTelemetryEnrichmentServiceCollectionExtensionsTests.<InstanceMethod_SwallowsExceptionsFromEnrich>d__6.MoveNext()
[xUnit.net 00:00:01.85] --- End of stack trace from previous location where exception was thrown ---
[xUnit.net 00:00:01.85] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[xUnit.net 00:00:01.85] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[xUnit.net 00:00:01.85] --- End of stack trace from previous location where exception was thrown ---
[xUnit.net 00:00:01.85] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[xUnit.net 00:00:01.85] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[xUnit.net 00:00:01.85] --- End of stack trace from previous location where exception was thrown ---
[xUnit.net 00:00:01.85] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[xUnit.net 00:00:01.85] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[xUnit.net 00:00:01.85] System.MissingMethodException : Method not found: 'System.Reflection.Assembly Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.Interfaces.AssemblyResolveEventArgs.get_RequestingAssembly()'.
[xUnit.net 00:00:01.85] Stack Trace:
[xUnit.net 00:00:01.85] at Microsoft.Extensions.Hosting.HostBuilder.Build()
[xUnit.net 00:00:01.85] /_/test/OpenTelemetry.Extensions.Enrichment.Tests/OpenTelemetryEnrichmentServiceCollectionExtensionsTests.cs(197,0): at OpenTelemetry.Extensions.Enrichment.Tests.OpenTelemetryEnrichmentServiceCollectionExtensionsTests.<DelegateMethod_SwallowsExceptionsFromEnrichmentActions>d__5.MoveNext()
[xUnit.net 00:00:01.85] --- End of stack trace from previous location where exception was thrown ---
[xUnit.net 00:00:01.85] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[xUnit.net 00:00:01.85] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[xUnit.net 00:00:01.85] --- End of stack trace from previous location where exception was thrown ---
[xUnit.net 00:00:01.85] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[xUnit.net 00:00:01.85] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[xUnit.net 00:00:01.85] --- End of stack trace from previous location where exception was thrown ---
[xUnit.net 00:00:01.85] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[xUnit.net 00:00:01.85] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Failed OpenTelemetry.Extensions.Enrichment.Tests.OpenTelemetryEnrichmentServiceCollectionExtensionsTests.GenericMethod_TRegistersEnricher [599 ms]
Error Message:
System.IO.FileLoadException : Could not load file or assembly 'System.Diagnostics.DiagnosticSource, Version=8.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. Method does not exist. (Exception from HRESULT: 0x80131513)
---- System.MissingMethodException : Method not found: 'System.Reflection.Assembly Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.Interfaces.AssemblyResolveEventArgs.get_RequestingAssembly()'.
Stack Trace:
at Microsoft.Extensions.Hosting.HostBuilder.Build()
at OpenTelemetry.Extensions.Enrichment.Tests.OpenTelemetryEnrichmentServiceCollectionExtensionsTests.<GenericMethod_TRegistersEnricher>d__1.MoveNext() in /_/test/OpenTelemetry.Extensions.Enrichment.Tests/OpenTelemetryEnrichmentServiceCollectionExtensionsTests.cs:line 24
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
----- Inner Stack Trace -----
at Microsoft.VisualStudio.TestPlatform.Common.Utilities.AssemblyResolver.OnResolve(Object sender, AssemblyResolveEventArgs args)
at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)
Error: System.IO.FileLoadException : Could not load file or assembly 'System.Diagnostics.DiagnosticSource, Version=8.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. Method does not exist. (Exception from HRESULT: 0x80131513)
Updating open-telemetry/opentelemetry-dotnet-contrib to .NET 10.0.300 (see open-telemetry/opentelemetry-dotnet-contrib#4389) today breaks a number of our tests targeting
net462where-- RunConfiguration.DisableAppDomain=trueis passed todotnet test.For example:
The tests pass if
-- RunConfiguration.DisableAppDomain=falseis specified fornet462.