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

7.0.400 break: dotnet test fails on linux+mono #34986

Closed
AArnott opened this issue Aug 29, 2023 · 2 comments
Closed

7.0.400 break: dotnet test fails on linux+mono #34986

AArnott opened this issue Aug 29, 2023 · 2 comments
Labels
Area-DotNet Test untriaged Request triage from a team member

Comments

@AArnott
Copy link
Contributor

AArnott commented Aug 29, 2023

Describe the bug

Bumping our .NET SDK version from 7.0.302 to 7.0.400 breaks test runs on linux that target net472 with this error:

Could not resolve type with token 01000019 from typeref (expected class 'System.Diagnostics.TraceLevel' in assembly 'System

To Reproduce

I suppose you just have to run dotnet test on a net472 targeted project on linux while using the 7.0.400 .NET SDK.
You can use commit ab81e30daef1910300ec50c745d62588763e6869 from the Library.Template repo to repro it.

AArnott/Library.Template#216

Exceptions (if any)

Test run for /home/vsts/work/1/s/bin/Library.Tests/Release/net472/Library.Tests.dll (.NETFramework,Version=v4.7.2)
Microsoft (R) Test Execution Command Line Tool Version 17.7.0-preview-23364-03+bc17bb9693cfc4778ded51aa0ab7f1065433f989 (x64)
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
Logging Vstest Diagnostics in file: /home/vsts/work/1/a/test_logs/diag.log
A total of 1 test files matched the specified pattern.
Testhost process for source(s) '/home/vsts/work/1/s/bin/Library.Tests/Release/net472/Library.Tests.dll' exited with error: Unhandled Exception:
System.TypeInitializationException: The type initializer for 'Microsoft.VisualStudio.TestPlatform.ObjectModel.EqtTrace' threw an exception. ---> System.TypeLoadException: Could not load type of field 'Microsoft.VisualStudio.TestPlatform.ObjectModel.PlatformEqtTrace:TraceSourceLevelsMap' (1) due to: Could not resolve type with token 01000019 from typeref (expected class 'System.Diagnostics.TraceLevel' in assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089') assembly:System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 type:System.Diagnostics.TraceLevel member:(null)
   --- End of inner exception stack trace ---
  at Microsoft.VisualStudio.TestPlatform.TestHost.Program.Main (System.String[] args) [0x00033] in <6059d047aaf14e749a5c8d73c69afc94>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'Microsoft.VisualStudio.TestPlatform.ObjectModel.EqtTrace' threw an exception. ---> System.TypeLoadException: Could not load type of field 'Microsoft.VisualStudio.TestPlatform.ObjectModel.PlatformEqtTrace:TraceSourceLevelsMap' (1) due to: Could not resolve type with token 01000019 from typeref (expected class 'System.Diagnostics.TraceLevel' in assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089') assembly:System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 type:System.Diagnostics.TraceLevel member:(null)
   --- End of inner exception stack trace ---
  at Microsoft.VisualStudio.TestPlatform.TestHost.Program.Main (System.String[] args) [0x00033] in <6059d047aaf14e749a5c8d73c69afc94>:0 
. Please check the diagnostic logs for more information.

Further technical details

.NET SDK:
 Version:   7.0.400
 Commit:    73bf45718d

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  20.04
 OS Platform: Linux
 RID:         ubuntu.20.04-x64
 Base Path:   /opt/hostedtoolcache/dotnet/sdk/7.0.400/

Host:
  Version:      7.0.10
  Architecture: x64
  Commit:       a6dbb800a4

.NET SDKs installed:
  7.0.400 [/opt/hostedtoolcache/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 7.0.10 [/opt/hostedtoolcache/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.21 [/opt/hostedtoolcache/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.10 [/opt/hostedtoolcache/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  DOTNET_ROOT       [/opt/hostedtoolcache/dotnet]

global.json file:
  /home/vsts/work/1/s/global.json
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-DotNet Test untriaged Request triage from a team member labels Aug 29, 2023
@AArnott
Copy link
Contributor Author

AArnott commented Aug 29, 2023

I'll close as a duplicate of any/all these. Thanks.

@AArnott AArnott closed this as not planned Won't fix, can't repro, duplicate, stale Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-DotNet Test untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

2 participants