Microsoft.TestPlatform.CoreUtilities
doesn't have a System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute
#4638
Labels
Description
Hello, I have used
Microsoft.NET.Test.Sdk
for testing my service (.NET 6.0).In my service, reflection is used for finding specific custom attributes. It is okay until Microsoft.NET.Test.Sdk 17.3.3 version.
However, when using Microsoft.NET.Test.Sdk v17.4.0, I faced a problem about getting custom attributes by using
MethodInfo.GetCustomAttributes(Type, bool)
.The reason is
Microsoft.VisualStudio.TestPlatform.Common.Filtering.Condition::ThrownFormatExceptionForInvalidCondition(string)
hasDoesNotReturnAttribute
System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute
could not be loaded fromMicrosoft.TestPlatform.CoreUtilities
.This is the IL of
Void ThrowFormatExceptionForInvalidCondition(string)
.It refers to
System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute
of Microsoft.TestPlatform.CoreUtilities.I think
Microsoft.VisualStudio.TestPlatform.Common.dll
has wrong reference aboutSystem.Diagnostics.CodeAnalysis
.Could you solve this problem? Thank you :)
IL of Microsoft.TestPlatform.CoreUtilities v17.3.3
It includes
DoesNotReturnAttribute
IL of Microsoft.TestPlatform.CoreUtilities v17.4.0
not include
DoesNotReturnAttribute
Sample Code
Dependencies
Diagnostic logs
Environment
The text was updated successfully, but these errors were encountered: