Skip to content

[dotnet-sdk-11.0.100-preview.4.26214.103] GlobalToolsNETCore21Part02 execute "dotnet vstest" failed with error: System.TypeLoadException : Could not load type 'Microsoft.Extensions.Logging.Internal.FormattedLogValues'... #126995

@WeiweiCaiAcpt

Description

@WeiweiCaiAcpt

Description

When running "dotnet vstest DockerWatch.Test.dll" on latest build dotnet-sdk-11.0.100-preview.4.26214.103, there are three cases failed with error: System.TypeLoadException : Could not load type 'Microsoft.Extensions.Logging.Internal.FormattedLogValues' from assembly 'Microsoft.Extensions.Logging.Abstractions, Version=11.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.

Reproduction Steps

Environment Configuration:

  1. Copy GlobalToolsNETCore21Part02Test56 from \appcompatsrv\BugRepro_Share\2940187 to local machine.
  2. Install dotnet-sdk-11.0.100-preview.4.26214.103.
  3. Modify DockerWatch.Test.runtimeconfig.json to enable the app to run on dotnet-sdk-11.0.100-preview.4.26214.103.
    "framework": {
    "name": "Microsoft.NETCore.App",
    "version": "11.0.0-preview.4.26214.103"
    }

Repro Steps:

  1. Open cmd in GlobalToolsNETCore21Part02Test56.
  2. Execute command: dotnet vstest DockerWatch.Test.dll.

Expected behavior

Passed! - Failed: 0, Passed: 18, Skipped: 0, Total: 18, Duration: 3 s - DockerWatch.Test.dll

Actual behavior

Error Message:
System.TypeLoadException : Could not load type 'Microsoft.Extensions.Logging.Internal.FormattedLogValues' from assembly 'Microsoft.Extensions.Logging.Abstractions, Version=11.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
Stack Trace:
at DockerWatch.Test.LoggerAdapterTest.LogInformation_ShouldLogAnInformationMessage() in C:\Users\v-joyzhu\Desktop\unit test\docker-watch-master\docker-watch-master\test\DockerWatch.Test\LoggerAdapterTest.cs:line 17
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

Failed! - Failed: 3, Passed: 15, Skipped: 0, Total: 18, Duration: 3 s - DockerWatch.Test.dll

Regression?

Yes

Verify Scenarios:
1). Windows 11 25H2 AMD64 + dotnet-sdk-11.0.100-preview.3.26207.106: Pass
2). Windows 11 25H2 AMD64 + dotnet-sdk-11.0.100-preview.4.26210.111: Fail
3). Windows 11 25H2 AMD64 + dotnet-sdk-11.0.100-preview.4.26214.103: Fail

Known Workarounds

No response

Configuration

Application Name: GlobalToolsNETCore21Part02
OS: Windows 11 25H2
CPU: X64
.NET Build Number: dotnet-sdk-11.0.100-preview.4.26214.103

dotnet --info
.NET SDK:
Version: 11.0.100-preview.4.26214.103
Commit: b94d039caa
Workload version: 11.0.100-manifests.d6ec7560
MSBuild version: 18.7.0-preview-26214-103+b94d039ca

Runtime Environment:
OS Name: Windows
OS Version: 10.0.26200
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\11.0.100-preview.4.26214.103\

Host:
Version: 11.0.0-preview.4.26214.103
Architecture: x64
Commit: b94d039caa

.NET SDKs installed:
11.0.100-preview.4.26214.103 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 11.0.0-preview.4.26214.103 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 11.0.0-preview.4.26214.103 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 11.0.0-preview.4.26214.103 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other information

@dotnet-actwx-bot @dotnet/compat

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions