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

Using Covariance generates not loadable assembly - covariant or contravariant type parameter was used illegally #76538

Open
vzabavnov opened this issue Dec 20, 2024 · 1 comment
Labels
Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead

Comments

@vzabavnov
Copy link

The issue is in both net8.0 and net9.0

the test:

using Xunit;

namespace Tests;

public interface IInterface<TEntity, in TContext>
    where TEntity : IInterface<TEntity, TContext>
{
    public static void Method<TEntityProperty>()
        where TEntityProperty : IInterface<TEntityProperty, TContext> { }
}

public class UnitTests
{
    [Fact]
    public void TheTest() { }
}

Compiler gives no errors.
The test gives error :

ERROR Could not load type 'Tests.IInterface`2' from assembly 'TheCovariantTests, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because a covariant or contravariant type parameter was used illegally in a type parameter constraint in method ''., reason: System.TypeLoadException: Could not load type 'Tests.IInterface`2' from assembly 'TheCovariantTests, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because a covariant or contravariant type parameter was used illegally in a type parameter constraint in method ''. at System.Reflection.RuntimeAssembly.GetExportedTypes() at Xunit.Sdk.ReflectionAssemblyInfo.GetTypes(Boolean includePrivateTypes) in /_/src/xunit.execution/Sdk/Reflection/ReflectionAssemblyInfo.cs:line 80 at Xunit.Sdk.TestCollectionFactoryHelper.GetTestCollectionDefinitions(IAssemblyInfo assemblyInfo, IMessageSink diagnosticMessageSink) in /_/src/xunit.execution/Sdk/Frameworks/TestCollectionFactoryHelper.cs:line 22 at Xunit.Sdk.CollectionPerClassTestCollectionFactory..ctor(ITestAssembly testAssembly, IMessageSink diagnosticMessageSink) in /_/src/xunit.execution/Sdk/Frameworks/CollectionPerClassTestCollectionFactory.cs:line 27 at Xunit.Sdk.ExtensibilityPointFactory.GetXunitTestCollectionFactory(IMessageSink diagnosticMessageSink, IAttributeInfo collectionBehaviorAttribute, ITestAssembly testAssembly) in /_/src/xunit.execution/Sdk/ExtensibilityPointFactory.cs:line 245 at Xunit.Sdk.XunitTestFrameworkDiscoverer..ctor(IAssemblyInfo assemblyInfo, ISourceInformationProvider sourceProvider, IMessageSink diagnosticMessageSink, IXunitTestCollectionFactory collectionFactory) in /_/src/xunit.execution/Sdk/Frameworks/XunitTestFrameworkDiscoverer.cs:line 45 at Xunit.Sdk.XunitTestFramework.CreateDiscoverer(IAssemblyInfo assemblyInfo) in /_/src/xunit.execution/Sdk/Frameworks/XunitTestFramework.cs:line 21 at Xunit.Sdk.TestFramework.GetDiscoverer(IAssemblyInfo assemblyInfo) in /_/src/xunit.execution/Sdk/Frameworks/TestFramework.cs:line 71 at Xunit.Sdk.TestFrameworkProxy.GetDiscoverer(IAssemblyInfo assembly) in /_/src/xunit.execution/Sdk/Frameworks/TestFrameworkProxy.cs:line 68 at Xunit.Xunit2Discoverer..ctor(AppDomainSupport appDomainSupport, ISourceInformationProvider sourceInformationProvider, IAssemblyInfo assemblyInfo, String assemblyFileName, String xunitExecutionAssemblyPath, String configFileName, Boolean shadowCopy, String shadowCopyFolder, IMessageSink diagnosticMessageSink, Boolean verifyAssembliesOnDisk) in /_/src/xunit.runner.utility/Frameworks/v2/Xunit2Discoverer.cs:line 107 at Xunit.Xunit2Discoverer..ctor(AppDomainSupport appDomainSupport, ISourceInformationProvider sourceInformationProvider, String assemblyFileName, String configFileName, Boolean shadowCopy, String shadowCopyFolder, IMessageSink diagnosticMessageSink, Boolean verifyAssembliesOnDisk) in /_/src/xunit.runner.utility/Frameworks/v2/Xunit2Discoverer.cs:line 63 at Xunit.Xunit2..ctor(AppDomainSupport appDomainSupport, ISourceInformationProvider sourceInformationProvider, String assemblyFileName, String configFileName, Boolean shadowCopy, String shadowCopyFolder, IMessageSink diagnosticMessageSink, Boolean verifyTestAssemblyExists) in /_/src/xunit.runner.utility/Frameworks/v2/Xunit2.cs:line 41 at Xunit.XunitFrontController.CreateInnerController() in /_/src/xunit.runner.utility/Frameworks/XunitFrontController.cs:line 134 at Xunit.XunitFrontController.EnsureInitialized() in /_/src/xunit.runner.utility/Frameworks/XunitFrontController.cs:line 153 at Xunit.XunitFrontController.get_InnerController() in /_/src/xunit.runner.utility/Frameworks/XunitFrontController.cs:line 93 at Xunit.XunitFrontController.Find(Boolean includeSourceInformation, IMessageSink messageSink, ITestFrameworkDiscoveryOptions discoveryOptions) in /_/src/xunit.runner.utility/Frameworks/XunitFrontController.cs:line 163 at TestFrameworkExtensions.Find(ITestFrameworkDiscoverer discoverer, Boolean includeSourceInformation, IMessageSinkWithTypes discoveryMessageSink, ITestFrameworkDiscoveryOptions discoveryOptions) in /_/src/xunit.runner.utility/Extensions/TestFrameworkExtensions.cs:line 22 at JetBrains.ReSharper.TestRunner.Adapters.XUnit.Discoverer.ReportAll() in Z:\BuildAgent\work\1b668fe37ef92293\ReSharperTestRunner\src\Adapters\TestRunner.Adapters.XUnit\Discoverer.cs:line 57 at JetBrains.ReSharper.TestRunner.Adapters.XUnit.XUnitRunner.RunTests(TestRunRequest request, ITestDiscoverySink discoverySink, ITestExecutionSink executionSink) in Z:\BuildAgent\work\1b668fe37ef92293\ReSharperTestRunner\src\Adapters\TestRunner.Adapters.XUnit\XUnitRunner.cs:line 62 at JetBrains.ReSharper.TestRunner.Implementation.UnitTestRemoteAgent.Execute(TestRunRequest request) at JetBrains.ReSharper.TestRunner.Implementation.ClientEndpoint.<>c__DisplayClass4_1.<TryRegisterHandler>b__1() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at JetBrains.ReSharper.TestRunner.Implementation.ClientEndpoint.RunAndLog(Func`2 handler, IAutoRegisterInProtocol message)

--- EXCEPTION #1/2 [RdFault]
Message = “
  Could not load type 'Tests.IInterface`2' from assembly 'TheCovariantTests, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because a covariant or contravariant type parameter was used illegally in a type parameter constraint in method ''., reason: System.TypeLoadException: Could not load type 'Tests.IInterface`2' from assembly 'TheCovariantTests, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because a covariant or contravariant type parameter was used illegally in a type parameter constraint in method ''.
     at System.Reflection.RuntimeAssembly.GetExportedTypes()
     at Xunit.Sdk.ReflectionAssemblyInfo.GetTypes(Boolean includePrivateTypes) in /_/src/xunit.execution/Sdk/Reflection/ReflectionAssemblyInfo.cs:line 80
     at Xunit.Sdk.TestCollectionFactoryHelper.GetTestCollectionDefinitions(IAssemblyInfo assemblyInfo, IMessageSink diagnosticMessageSink) in /_/src/xunit.execution/Sdk/Frameworks/TestCollectionFactoryHelper.cs:line 22
     at Xunit.Sdk.CollectionPerClassTestCollectionFactory..ctor(ITestAssembly testAssembly, IMessageSink diagnosticMessageSink) in /_/src/xunit.execution/Sdk/Frameworks/CollectionPerClassTestCollectionFactory.cs:line 27
     at Xunit.Sdk.ExtensibilityPointFactory.GetXunitTestCollectionFactory(IMessageSink diagnosticMessageSink, IAttributeInfo collectionBehaviorAttribute, ITestAssembly testAssembly) in /_/src/xunit.execution/Sdk/ExtensibilityPointFactory.cs:line 245
     at Xunit.Sdk.XunitTestFrameworkDiscoverer..ctor(IAssemblyInfo assemblyInfo, ISourceInformationProvider sourceProvider, IMessageSink diagnosticMessageSink, IXunitTestCollectionFactory collectionFactory) in /_/src/xunit.execution/Sdk/Frameworks/XunitTestFrameworkDiscoverer.cs:line 45
     at Xunit.Sdk.XunitTestFramework.CreateDiscoverer(IAssemblyInfo assemblyInfo) in /_/src/xunit.execution/Sdk/Frameworks/XunitTestFramework.cs:line 21
     at Xunit.Sdk.TestFramework.GetDiscoverer(IAssemblyInfo assemblyInfo) in /_/src/xunit.execution/Sdk/Frameworks/TestFramework.cs:line 71
     at Xunit.Sdk.TestFrameworkProxy.GetDiscoverer(IAssemblyInfo assembly) in /_/src/xunit.execution/Sdk/Frameworks/TestFrameworkProxy.cs:line 68
     at Xunit.Xunit2Discoverer..ctor(AppDomainSupport appDomainSupport, ISourceInformationProvider sourceInformationProvider, IAssemblyInfo assemblyInfo, String assemblyFileName, String xunitExecutionAssemblyPath, String configFileName, Boolean shadowCopy, String shadowCopyFolder, IMessageSink diagnosticMessageSink, Boolean verifyAssembliesOnDisk) in /_/src/xunit.runner.utility/Frameworks/v2/Xunit2Discoverer.cs:line 107
     at Xunit.Xunit2Discoverer..ctor(AppDomainSupport appDomainSupport, ISourceInformationProvider sourceInformationProvider, String assemblyFileName, String configFileName, Boolean shadowCopy, String shadowCopyFolder, IMessageSink diagnosticMessageSink, Boolean verifyAssembliesOnDisk) in /_/src/xunit.runner.utility/Frameworks/v2/Xunit2Discoverer.cs:line 63
     at Xunit.Xunit2..ctor(AppDomainSupport appDomainSupport, ISourceInformationProvider sourceInformationProvider, String assemblyFileName, String configFileName, Boolean shadowCopy, String shadowCopyFolder, IMessageSink diagnosticMessageSink, Boolean verifyTestAssemblyExists) in /_/src/xunit.runner.utility/Frameworks/v2/Xunit2.cs:line 41
     at Xunit.XunitFrontController.CreateInnerController() in /_/src/xunit.runner.utility/Frameworks/XunitFrontController.cs:line 134
     at Xunit.XunitFrontController.EnsureInitialized() in /_/src/xunit.runner.utility/Frameworks/XunitFrontController.cs:line 153
     at Xunit.XunitFrontController.get_InnerController() in /_/src/xunit.runner.utility/Frameworks/XunitFrontController.cs:line 93
     at Xunit.XunitFrontController.Find(Boolean includeSourceInformation, IMessageSink messageSink, ITestFrameworkDiscoveryOptions discoveryOptions) in /_/src/xunit.runner.utility/Frameworks/XunitFrontController.cs:line 163
     at TestFrameworkExtensions.Find(ITestFrameworkDiscoverer discoverer, Boolean includeSourceInformation, IMessageSinkWithTypes discoveryMessageSink, ITestFrameworkDiscoveryOptions discoveryOptions) in /_/src/xunit.runner.utility/Extensions/TestFrameworkExtensions.cs:line 22
     at JetBrains.ReSharper.TestRunner.Adapters.XUnit.Discoverer.ReportAll() in Z:\BuildAgent\work\1b668fe37ef92293\ReSharperTestRunner\src\Adapters\TestRunner.Adapters.XUnit\Discoverer.cs:line 57
     at JetBrains.ReSharper.TestRunner.Adapters.XUnit.XUnitRunner.RunTests(TestRunRequest request, ITestDiscoverySink discoverySink, ITestExecutionSink executionSink) in Z:\BuildAgent\work\1b668fe37ef92293\ReSharperTestRunner\src\Adapters\TestRunner.Adapters.XUnit\XUnitRunner.cs:line 62
     at JetBrains.ReSharper.TestRunner.Implementation.UnitTestRemoteAgent.Execute(TestRunRequest request)
     at JetBrains.ReSharper.TestRunner.Implementation.ClientEndpoint.<>c__DisplayClass4_1.<TryRegisterHandler>b__1()
     at System.Threading.Tasks.Task`1.InnerInvoke()
     at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
  --- End of stack trace from previous location ---
     at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
     at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
  --- End of stack trace from previous location ---
     at JetBrains.ReSharper.TestRunner.Implementation.ClientEndpoint.RunAndLog(Func`2 handler, IAutoRegisterInProtocol message)
”
ReasonTypeFqn = System.TypeLoadException
ReasonText = “
  System.TypeLoadException: Could not load type 'Tests.IInterface`2' from assembly 'TheCovariantTests, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because a covariant or contravariant type parameter was used illegally in a type parameter constraint in method ''.
     at System.Reflection.RuntimeAssembly.GetExportedTypes()
     at Xunit.Sdk.ReflectionAssemblyInfo.GetTypes(Boolean includePrivateTypes) in /_/src/xunit.execution/Sdk/Reflection/ReflectionAssemblyInfo.cs:line 80
     at Xunit.Sdk.TestCollectionFactoryHelper.GetTestCollectionDefinitions(IAssemblyInfo assemblyInfo, IMessageSink diagnosticMessageSink) in /_/src/xunit.execution/Sdk/Frameworks/TestCollectionFactoryHelper.cs:line 22
     at Xunit.Sdk.CollectionPerClassTestCollectionFactory..ctor(ITestAssembly testAssembly, IMessageSink diagnosticMessageSink) in /_/src/xunit.execution/Sdk/Frameworks/CollectionPerClassTestCollectionFactory.cs:line 27
     at Xunit.Sdk.ExtensibilityPointFactory.GetXunitTestCollectionFactory(IMessageSink diagnosticMessageSink, IAttributeInfo collectionBehaviorAttribute, ITestAssembly testAssembly) in /_/src/xunit.execution/Sdk/ExtensibilityPointFactory.cs:line 245
     at Xunit.Sdk.XunitTestFrameworkDiscoverer..ctor(IAssemblyInfo assemblyInfo, ISourceInformationProvider sourceProvider, IMessageSink diagnosticMessageSink, IXunitTestCollectionFactory collectionFactory) in /_/src/xunit.execution/Sdk/Frameworks/XunitTestFrameworkDiscoverer.cs:line 45
     at Xunit.Sdk.XunitTestFramework.CreateDiscoverer(IAssemblyInfo assemblyInfo) in /_/src/xunit.execution/Sdk/Frameworks/XunitTestFramework.cs:line 21
     at Xunit.Sdk.TestFramework.GetDiscoverer(IAssemblyInfo assemblyInfo) in /_/src/xunit.execution/Sdk/Frameworks/TestFramework.cs:line 71
     at Xunit.Sdk.TestFrameworkProxy.GetDiscoverer(IAssemblyInfo assembly) in /_/src/xunit.execution/Sdk/Frameworks/TestFrameworkProxy.cs:line 68
     at Xunit.Xunit2Discoverer..ctor(AppDomainSupport appDomainSupport, ISourceInformationProvider sourceInformationProvider, IAssemblyInfo assemblyInfo, String assemblyFileName, String xunitExecutionAssemblyPath, String configFileName, Boolean shadowCopy, String shadowCopyFolder, IMessageSink diagnosticMessageSink, Boolean verifyAssembliesOnDisk) in /_/src/xunit.runner.utility/Frameworks/v2/Xunit2Discoverer.cs:line 107
     at Xunit.Xunit2Discoverer..ctor(AppDomainSupport appDomainSupport, ISourceInformationProvider sourceInformationProvider, String assemblyFileName, String configFileName, Boolean shadowCopy, String shadowCopyFolder, IMessageSink diagnosticMessageSink, Boolean verifyAssembliesOnDisk) in /_/src/xunit.runner.utility/Frameworks/v2/Xunit2Discoverer.cs:line 63
     at Xunit.Xunit2..ctor(AppDomainSupport appDomainSupport, ISourceInformationProvider sourceInformationProvider, String assemblyFileName, String configFileName, Boolean shadowCopy, String shadowCopyFolder, IMessageSink diagnosticMessageSink, Boolean verifyTestAssemblyExists) in /_/src/xunit.runner.utility/Frameworks/v2/Xunit2.cs:line 41
     at Xunit.XunitFrontController.CreateInnerController() in /_/src/xunit.runner.utility/Frameworks/XunitFrontController.cs:line 134
     at Xunit.XunitFrontController.EnsureInitialized() in /_/src/xunit.runner.utility/Frameworks/XunitFrontController.cs:line 153
     at Xunit.XunitFrontController.get_InnerController() in /_/src/xunit.runner.utility/Frameworks/XunitFrontController.cs:line 93
     at Xunit.XunitFrontController.Find(Boolean includeSourceInformation, IMessageSink messageSink, ITestFrameworkDiscoveryOptions discoveryOptions) in /_/src/xunit.runner.utility/Frameworks/XunitFrontController.cs:line 163
     at TestFrameworkExtensions.Find(ITestFrameworkDiscoverer discoverer, Boolean includeSourceInformation, IMessageSinkWithTypes discoveryMessageSink, ITestFrameworkDiscoveryOptions discoveryOptions) in /_/src/xunit.runner.utility/Extensions/TestFrameworkExtensions.cs:line 22
     at JetBrains.ReSharper.TestRunner.Adapters.XUnit.Discoverer.ReportAll() in Z:\BuildAgent\work\1b668fe37ef92293\ReSharperTestRunner\src\Adapters\TestRunner.Adapters.XUnit\Discoverer.cs:line 57
     at JetBrains.ReSharper.TestRunner.Adapters.XUnit.XUnitRunner.RunTests(TestRunRequest request, ITestDiscoverySink discoverySink, ITestExecutionSink executionSink) in Z:\BuildAgent\work\1b668fe37ef92293\ReSharperTestRunner\src\Adapters\TestRunner.Adapters.XUnit\XUnitRunner.cs:line 62
     at JetBrains.ReSharper.TestRunner.Implementation.UnitTestRemoteAgent.Execute(TestRunRequest request)
     at JetBrains.ReSharper.TestRunner.Implementation.ClientEndpoint.<>c__DisplayClass4_1.<TryRegisterHandler>b__1()
     at System.Threading.Tasks.Task`1.InnerInvoke()
     at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
  --- End of stack trace from previous location ---
     at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
     at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
  --- End of stack trace from previous location ---
     at JetBrains.ReSharper.TestRunner.Implementation.ClientEndpoint.RunAndLog(Func`2 handler, IAutoRegisterInProtocol message)
”
ReasonMessage = “Could not load type 'Tests.IInterface`2' from assembly 'TheCovariantTests, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because a covariant or contravariant type parameter was used illegally in a type parameter constraint in method ''.”
StackTraceString = “
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in Throw.il:line IL_000C mvid BC47
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in HandleNonSuccessAndDebuggerNotification.il:line IL_0028 mvid BC47
     at JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner.Activation.ServerMessageBroker.<SendMessage>d__2.MoveNext() in SendMessage.il:line IL_0077 mvid 42AD
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in Throw.il:line IL_000C mvid BC47
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in HandleNonSuccessAndDebuggerNotification.il:line IL_0028 mvid BC47
     at JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner.TestRunnerAgentManager.TestRunnerExecutionAgent.<<RunTests>b__8_1>d.MoveNext() in RunTests.il:line IL_00AE mvid 42AD or RunTests.il:line IL_02D6 mvid 42AD
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in Throw.il:line IL_000C mvid BC47
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in HandleNonSuccessAndDebuggerNotification.il:line IL_0028 mvid BC47
     at JetBrains.ReSharper.UnitTestFramework.Common.Extensions.TaskExtensions.<ThrowIf>d__13`1.MoveNext() in ThrowIf.il:line IL_0118 mvid 42AD
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in Throw.il:line IL_000C mvid BC47
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in HandleNonSuccessAndDebuggerNotification.il:line IL_0028 mvid BC47
     at JetBrains.ReSharper.UnitTestFramework.Common.Extensions.TaskExtensions.<CancelIf>d__15.MoveNext() in CancelIf.il:line IL_0126 mvid 42AD
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in Throw.il:line IL_000C mvid BC47
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in HandleNonSuccessAndDebuggerNotification.il:line IL_0028 mvid BC47
     at JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner.TestRunnerAgentManager.TestRunnerExecutionAgent.<RunTests>d__8.MoveNext() in RunTests.il:line IL_00AE mvid 42AD or RunTests.il:line IL_02D6 mvid 42AD
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in Throw.il:line IL_000C mvid BC47
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in HandleNonSuccessAndDebuggerNotification.il:line IL_0028 mvid BC47
     at JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner.TestRunnerRunStrategy.<Run>d__14.MoveNext() in Run.il:line IL_01C8 mvid 42AD
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in Throw.il:line IL_000C mvid BC47
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in HandleNonSuccessAndDebuggerNotification.il:line IL_0028 mvid BC47
     at JetBrains.ReSharper.UnitTestFramework.Execution.Launch.UnitTestRun.<StartCore>d__37.MoveNext() in StartCore.il:line IL_01E7 mvid 42AD or StartCore.il:line IL_03B3 mvid 42AD
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in Throw.il:line IL_000C mvid BC47
     at JetBrains.Util.Special.GeneralUtil.WithNotNull[T](T item, Action`1 F) in WithNotNull.il:line IL_001D mvid 4DEE
     at JetBrains.ReSharper.UnitTestFramework.Execution.Launch.UnitTestRun.<StartCore>d__37.MoveNext() in StartCore.il:line IL_01E7 mvid 42AD or StartCore.il:line IL_03B3 mvid 42AD
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in Throw.il:line IL_000C mvid BC47
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in HandleNonSuccessAndDebuggerNotification.il:line IL_0028 mvid BC47
     at JetBrains.ReSharper.UnitTestFramework.Execution.Launch.UnitTestRun.<Start>d__36.MoveNext() in Start.il:line IL_0182 mvid 42AD
”
ExceptionPath = Root.InnerException
ClassName = JetBrains.Rd.Tasks.RdFault
HResult = COR_E_EXCEPTION=80131500
Source = mscorlib
Data.ThreadLocalDebugInfo = “
  call `ServerSocket-<noname>.JetBrains.ReSharper.TestRunner.Abstractions.IClientEndpoint.System.Threading.Tasks.Task`1[JetBrains.ReSharper.TestRunner.Abstractions.Objects.IAutoRegisterInProtocol] SendMessage(JetBrains.ReSharper.TestRunner.Abstractions.Objects.IAutoRegisterInProtocol)_proxy` (2763052212960334136), taskId=1000006
   -> call `ServerSocket-<noname>.JetBrains.ReSharper.TestRunner.Abstractions.IClientEndpoint.System.Threading.Tasks.Task`1[JetBrains.ReSharper.TestRunner.Abstractions.Objects.IAutoRegisterInProtocol] SendMessage(JetBrains.ReSharper.TestRunner.Abstractions.Objects.IAutoRegisterInProtocol)_proxy` (2763052212960334136), taskId=1000006
”

--- Outer ---

--- EXCEPTION #2/2 [LoggerException]
Message = “
  Could not load type 'Tests.IInterface`2' from assembly 'TheCovariantTests, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because a covariant or contravariant type parameter was used illegally in a type parameter constraint in method ''., reason: System.TypeLoadException: Could not load type 'Tests.IInterface`2' from assembly 'TheCovariantTests, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because a covariant or contravariant type parameter was used illegally in a type parameter constraint in method ''.
     at System.Reflection.RuntimeAssembly.GetExportedTypes()
     at Xunit.Sdk.ReflectionAssemblyInfo.GetTypes(Boolean includePrivateTypes) in /_/src/xunit.execution/Sdk/Reflection/ReflectionAssemblyInfo.cs:line 80
     at Xunit.Sdk.TestCollectionFactoryHelper.GetTestCollectionDefinitions(IAssemblyInfo assemblyInfo, IMessageSink diagnosticMessageSink) in /_/src/xunit.execution/Sdk/Frameworks/TestCollectionFactoryHelper.cs:line 22
     at Xunit.Sdk.CollectionPerClassTestCollectionFactory..ctor(ITestAssembly testAssembly, IMessageSink diagnosticMessageSink) in /_/src/xunit.execution/Sdk/Frameworks/CollectionPerClassTestCollectionFactory.cs:line 27
     at Xunit.Sdk.ExtensibilityPointFactory.GetXunitTestCollectionFactory(IMessageSink diagnosticMessageSink, IAttributeInfo collectionBehaviorAttribute, ITestAssembly testAssembly) in /_/src/xunit.execution/Sdk/ExtensibilityPointFactory.cs:line 245
     at Xunit.Sdk.XunitTestFrameworkDiscoverer..ctor(IAssemblyInfo assemblyInfo, ISourceInformationProvider sourceProvider, IMessageSink diagnosticMessageSink, IXunitTestCollectionFactory collectionFactory) in /_/src/xunit.execution/Sdk/Frameworks/XunitTestFrameworkDiscoverer.cs:line 45
     at Xunit.Sdk.XunitTestFramework.CreateDiscoverer(IAssemblyInfo assemblyInfo) in /_/src/xunit.execution/Sdk/Frameworks/XunitTestFramework.cs:line 21
     at Xunit.Sdk.TestFramework.GetDiscoverer(IAssemblyInfo assemblyInfo) in /_/src/xunit.execution/Sdk/Frameworks/TestFramework.cs:line 71
     at Xunit.Sdk.TestFrameworkProxy.GetDiscoverer(IAssemblyInfo assembly) in /_/src/xunit.execution/Sdk/Frameworks/TestFrameworkProxy.cs:line 68
     at Xunit.Xunit2Discoverer..ctor(AppDomainSupport appDomainSupport, ISourceInformationProvider sourceInformationProvider, IAssemblyInfo assemblyInfo, String assemblyFileName, String xunitExecutionAssemblyPath, String configFileName, Boolean shadowCopy, String shadowCopyFolder, IMessageSink diagnosticMessageSink, Boolean verifyAssembliesOnDisk) in /_/src/xunit.runner.utility/Frameworks/v2/Xunit2Discoverer.cs:line 107
     at Xunit.Xunit2Discoverer..ctor(AppDomainSupport appDomainSupport, ISourceInformationProvider sourceInformationProvider, String assemblyFileName, String configFileName, Boolean shadowCopy, String shadowCopyFolder, IMessageSink diagnosticMessageSink, Boolean verifyAssembliesOnDisk) in /_/src/xunit.runner.utility/Frameworks/v2/Xunit2Discoverer.cs:line 63
     at Xunit.Xunit2..ctor(AppDomainSupport appDomainSupport, ISourceInformationProvider sourceInformationProvider, String assemblyFileName, String configFileName, Boolean shadowCopy, String shadowCopyFolder, IMessageSink diagnosticMessageSink, Boolean verifyTestAssemblyExists) in /_/src/xunit.runner.utility/Frameworks/v2/Xunit2.cs:line 41
     at Xunit.XunitFrontController.CreateInnerController() in /_/src/xunit.runner.utility/Frameworks/XunitFrontController.cs:line 134
     at Xunit.XunitFrontController.EnsureInitialized() in /_/src/xunit.runner.utility/Frameworks/XunitFrontController.cs:line 153
     at Xunit.XunitFrontController.get_InnerController() in /_/src/xunit.runner.utility/Frameworks/XunitFrontController.cs:line 93
     at Xunit.XunitFrontController.Find(Boolean includeSourceInformation, IMessageSink messageSink, ITestFrameworkDiscoveryOptions discoveryOptions) in /_/src/xunit.runner.utility/Frameworks/XunitFrontController.cs:line 163
     at TestFrameworkExtensions.Find(ITestFrameworkDiscoverer discoverer, Boolean includeSourceInformation, IMessageSinkWithTypes discoveryMessageSink, ITestFrameworkDiscoveryOptions discoveryOptions) in /_/src/xunit.runner.utility/Extensions/TestFrameworkExtensions.cs:line 22
     at JetBrains.ReSharper.TestRunner.Adapters.XUnit.Discoverer.ReportAll() in Z:\BuildAgent\work\1b668fe37ef92293\ReSharperTestRunner\src\Adapters\TestRunner.Adapters.XUnit\Discoverer.cs:line 57
     at JetBrains.ReSharper.TestRunner.Adapters.XUnit.XUnitRunner.RunTests(TestRunRequest request, ITestDiscoverySink discoverySink, ITestExecutionSink executionSink) in Z:\BuildAgent\work\1b668fe37ef92293\ReSharperTestRunner\src\Adapters\TestRunner.Adapters.XUnit\XUnitRunner.cs:line 62
     at JetBrains.ReSharper.TestRunner.Implementation.UnitTestRemoteAgent.Execute(TestRunRequest request)
     at JetBrains.ReSharper.TestRunner.Implementation.ClientEndpoint.<>c__DisplayClass4_1.<TryRegisterHandler>b__1()
     at System.Threading.Tasks.Task`1.InnerInvoke()
     at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
  --- End of stack trace from previous location ---
     at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
     at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
  --- End of stack trace from previous location ---
     at JetBrains.ReSharper.TestRunner.Implementation.ClientEndpoint.RunAndLog(Func`2 handler, IAutoRegisterInProtocol message)
”
InnerException = “Exception #1 at Root.InnerException”
StackTraceString = “
  at JetBrains.Util.ILoggerEx.LogException(ILogger logger, LoggingLevel level, Exception exception, ExceptionOrigin exceptionOrigin, String comment) in LogException.il:line IL_0025 mvid 4DEE
     at JetBrains.Util.ILoggerEx.Error(ILogger logger, Exception exception, ExceptionOrigin origin, String comment) in Error.il:line IL_000A mvid 4DEE
     at JetBrains.ReSharper.UnitTestFramework.Execution.Launch.UnitTestRun.<Start>d__36.MoveNext() in Start.il:line IL_0182 mvid 42AD
     at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) in RunInternal.il:line IL_0079 mvid BC47
     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) in Run.il:line IL_0009 mvid BC47 or Run.il:line IL_0034 mvid BC47
     at System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run() in Run.il:line IL_0024 mvid BC47
     at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(Action action, Boolean allowInlining, Task& currentTask) in RunOrScheduleAction.il:line IL_001C mvid BC47
     at System.Threading.Tasks.Task.FinishContinuations() in FinishContinuations.il:line IL_0085 mvid BC47 or FinishContinuations.il:line IL_0099 mvid BC47
     at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) in Finish.il:line IL_0085 mvid BC47
     at System.Threading.Tasks.Task`1.TrySetException(Object exceptionObject) in TrySetException.il:line IL_002A mvid BC47
     at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetException(Exception exception) in SetException.il:line IL_0026 mvid BC47
     at JetBrains.ReSharper.UnitTestFramework.Execution.Launch.UnitTestRun.<StartCore>d__37.MoveNext() in StartCore.il:line IL_03B3 mvid 42AD
     at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) in RunInternal.il:line IL_0079 mvid BC47
     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) in Run.il:line IL_0009 mvid BC47 or Run.il:line IL_0034 mvid BC47
     at System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run() in Run.il:line IL_0024 mvid BC47
     at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(Action action, Boolean allowInlining, Task& currentTask) in RunOrScheduleAction.il:line IL_001C mvid BC47
     at System.Threading.Tasks.Task.FinishContinuations() in FinishContinuations.il:line IL_0085 mvid BC47 or FinishContinuations.il:line IL_0099 mvid BC47
     at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) in Finish.il:line IL_0085 mvid BC47
     at System.Threading.Tasks.Task`1.TrySetException(Object exceptionObject) in TrySetException.il:line IL_002A mvid BC47
     at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetException(Exception exception) in SetException.il:line IL_0026 mvid BC47
     at JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner.TestRunnerRunStrategy.<Run>d__14.MoveNext() in Run.il:line IL_01C8 mvid 42AD
     at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) in RunInternal.il:line IL_0079 mvid BC47
     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) in Run.il:line IL_0009 mvid BC47 or Run.il:line IL_0034 mvid BC47
     at System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run() in Run.il:line IL_0024 mvid BC47
     at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(Action action, Boolean allowInlining, Task& currentTask) in RunOrScheduleAction.il:line IL_001C mvid BC47
     at System.Threading.Tasks.Task.FinishContinuations() in FinishContinuations.il:line IL_0085 mvid BC47 or FinishContinuations.il:line IL_0099 mvid BC47
     at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) in Finish.il:line IL_0085 mvid BC47
     at System.Threading.Tasks.Task`1.TrySetException(Object exceptionObject) in TrySetException.il:line IL_002A mvid BC47
     at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetException(Exception exception) in SetException.il:line IL_0026 mvid BC47
     at JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner.TestRunnerAgentManager.TestRunnerExecutionAgent.<RunTests>d__8.MoveNext() in RunTests.il:line IL_00AE mvid 42AD or RunTests.il:line IL_02D6 mvid 42AD
     at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) in RunInternal.il:line IL_0079 mvid BC47
     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) in Run.il:line IL_0009 mvid BC47 or Run.il:line IL_0034 mvid BC47
     at System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run() in Run.il:line IL_0024 mvid BC47
     at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(Action action, Boolean allowInlining, Task& currentTask) in RunOrScheduleAction.il:line IL_001C mvid BC47
     at System.Threading.Tasks.Task.FinishContinuations() in FinishContinuations.il:line IL_0085 mvid BC47 or FinishContinuations.il:line IL_0099 mvid BC47
     at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) in Finish.il:line IL_0085 mvid BC47
     at System.Threading.Tasks.Task`1.TrySetException(Object exceptionObject) in TrySetException.il:line IL_002A mvid BC47
     at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetException(Exception exception) in SetException.il:line IL_0026 mvid BC47
     at JetBrains.ReSharper.UnitTestFramework.Common.Extensions.TaskExtensions.<CancelIf>d__15.MoveNext() in CancelIf.il:line IL_0126 mvid 42AD
     at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) in RunInternal.il:line IL_0079 mvid BC47
     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) in Run.il:line IL_0009 mvid BC47 or Run.il:line IL_0034 mvid BC47
     at System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run() in Run.il:line IL_0024 mvid BC47
     at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(Action action, Boolean allowInlining, Task& currentTask) in RunOrScheduleAction.il:line IL_001C mvid BC47
     at System.Threading.Tasks.Task.FinishContinuations() in FinishContinuations.il:line IL_0085 mvid BC47 or FinishContinuations.il:line IL_0099 mvid BC47
     at System.Threading.Tasks.Task`1.TrySetResult(TResult result) in TrySetResult.il:line IL_0055 mvid BC47
     at System.Threading.Tasks.TaskFactory.CompleteOnInvokePromise.Invoke(Task completingTask) in Invoke.il:line IL_004A mvid BC47
     at System.Threading.Tasks.Task.FinishContinuations() in FinishContinuations.il:line IL_0085 mvid BC47 or FinishContinuations.il:line IL_0099 mvid BC47
     at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) in Finish.il:line IL_0085 mvid BC47
     at System.Threading.Tasks.Task`1.TrySetException(Object exceptionObject) in TrySetException.il:line IL_002A mvid BC47
     at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetException(Exception exception) in SetException.il:line IL_0026 mvid BC47
     at JetBrains.ReSharper.UnitTestFramework.Common.Extensions.TaskExtensions.<ThrowIf>d__13`1.MoveNext() in ThrowIf.il:line IL_0118 mvid 42AD
     at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) in RunInternal.il:line IL_0079 mvid BC47
     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) in Run.il:line IL_0009 mvid BC47 or Run.il:line IL_0034 mvid BC47
     at System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run() in Run.il:line IL_0024 mvid BC47
     at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(Action action, Boolean allowInlining, Task& currentTask) in RunOrScheduleAction.il:line IL_001C mvid BC47
     at System.Threading.Tasks.Task.FinishContinuations() in FinishContinuations.il:line IL_0085 mvid BC47 or FinishContinuations.il:line IL_0099 mvid BC47
     at System.Threading.Tasks.Task`1.TrySetResult(TResult result) in TrySetResult.il:line IL_0055 mvid BC47
     at System.Threading.Tasks.TaskFactory.CompleteOnInvokePromise.Invoke(Task completingTask) in Invoke.il:line IL_004A mvid BC47
     at System.Threading.Tasks.Task.FinishContinuations() in FinishContinuations.il:line IL_0085 mvid BC47 or FinishContinuations.il:line IL_0099 mvid BC47
     at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) in Finish.il:line IL_0085 mvid BC47
     at System.Threading.Tasks.Task`1.TrySetException(Object exceptionObject) in TrySetException.il:line IL_002A mvid BC47
     at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetException(Exception exception) in SetException.il:line IL_0026 mvid BC47
     at JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner.TestRunnerAgentManager.TestRunnerExecutionAgent.<<RunTests>b__8_1>d.MoveNext() in RunTests.il:line IL_00AE mvid 42AD or RunTests.il:line IL_02D6 mvid 42AD
     at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) in RunInternal.il:line IL_0079 mvid BC47
     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) in Run.il:line IL_0009 mvid BC47 or Run.il:line IL_0034 mvid BC47
     at System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run() in Run.il:line IL_0024 mvid BC47
     at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(Action action, Boolean allowInlining, Task& currentTask) in RunOrScheduleAction.il:line IL_001C mvid BC47
     at System.Threading.Tasks.Task.FinishContinuations() in FinishContinuations.il:line IL_0085 mvid BC47 or FinishContinuations.il:line IL_0099 mvid BC47
     at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) in Finish.il:line IL_0085 mvid BC47
     at System.Threading.Tasks.Task`1.TrySetException(Object exceptionObject) in TrySetException.il:line IL_002A mvid BC47
     at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetException(Exception exception) in SetException.il:line IL_0026 mvid BC47
     at JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner.Activation.ServerMessageBroker.<SendMessage>d__2.MoveNext() in SendMessage.il:line IL_0077 mvid 42AD
     at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) in RunInternal.il:line IL_0079 mvid BC47
     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) in Run.il:line IL_0009 mvid BC47 or Run.il:line IL_0034 mvid BC47
     at System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run() in Run.il:line IL_0024 mvid BC47
     at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(Action action, Boolean allowInlining, Task& currentTask) in RunOrScheduleAction.il:line IL_001C mvid BC47
     at System.Threading.Tasks.Task.FinishContinuations() in FinishContinuations.il:line IL_0085 mvid BC47 or FinishContinuations.il:line IL_0099 mvid BC47
     at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) in Finish.il:line IL_0085 mvid BC47
     at System.Threading.Tasks.Task`1.TrySetException(Object exceptionObject) in TrySetException.il:line IL_002A mvid BC47
     at System.Threading.Tasks.TaskCompletionSource`1.TrySetException(Exception exception) in TrySetException.il:line IL_000E mvid BC47
     at System.Threading.Tasks.TaskCompletionSource`1.SetException(Exception exception) in SetException.il:line IL_000E mvid BC47
     at JetBrains.Collections.Viewable.SignalBase`1.Fire(T value) in Fire.il:line IL_0028 mvid 5279
     at JetBrains.Collections.Viewable.WriteOnceProperty`1.WriteOnceSignal.Fire(T value) in Fire.il:line IL_0000 mvid 5279
     at JetBrains.Collections.Viewable.WriteOnceProperty`1.SetIfEmpty(T newValue) in SetIfEmpty.il:line IL_0046 mvid 5279
     at JetBrains.Rd.Tasks.WiredRdTask`2.CallSite.<>c__DisplayClass5_0.<OnWireReceived>b__0() in CallSite.il:line IL_0000 mvid 22C3
     at JetBrains.Rd.Impl.MessageBroker.RdWireableDispatchHelper.<>c__DisplayClass12_0.<DoDispatch>b__0() in RdWireableDispatchHelper.il:line IL_008B mvid 22C3
     at JetBrains.Rd.Impl.MessageBroker.RdWireableDispatchHelper.DoDispatch(Lifetime lifetime, IScheduler scheduler, Action action) in DoDispatch.il:line IL_00C2 mvid 22C3
     at JetBrains.Rd.Tasks.WiredRdTask`2.CallSite.OnWireReceived(IProtocol proto, SerializationCtx ctx, UnsafeReader reader, IRdWireableDispatchHelper dispatchHelper) in OnWireReceived.il:line IL_015C mvid 22C3
     at JetBrains.Rd.Tasks.WiredRdTask`2.OnWireReceived(UnsafeReader reader, IRdWireableDispatchHelper dispatchHelper) in OnWireReceived.il:line IL_007B mvid 22C3
     at JetBrains.Rd.Impl.MessageBroker.DispatchImpl(Byte[] msg) in DispatchImpl.il:line IL_0112 mvid 22C3
     at JetBrains.Rd.Impl.MessageBroker.Dispatch(Byte[] msg) in Dispatch.il:line IL_003F mvid 22C3
     at JetBrains.Diagnostics.LogEx.Catch(ILog log, Action action) in Catch.il:line IL_0000 mvid 5279
     at JetBrains.Rd.Impl.SocketWire.Base.ReadMsg() in ReadMsg.il:line IL_00C8 mvid 22C3
     at JetBrains.Rd.Impl.SocketWire.Base.ReceiverProc(Socket socket) in ReceiverProc.il:line IL_006C mvid 22C3
     at JetBrains.Rd.Impl.SocketWire.Base.<>c__DisplayClass19_0.<.ctor>b__1(Socket socket) in Base.il:line IL_005C mvid 22C3
     at JetBrains.Collections.Viewable.SignalBase`1.Fire(T value) in Fire.il:line IL_0028 mvid 5279
     at JetBrains.Collections.Viewable.ViewableProperty`1.set_Value(T value)
     at JetBrains.Rd.Impl.SocketWire.Server.<>c__DisplayClass4_0.<StartServerSocket>b__1() in Server.il:line IL_002F mvid 22C3 or Server.il:line IL_00F6 mvid 22C3
     at JetBrains.Diagnostics.LogEx.Catch(ILog log, Action action) in Catch.il:line IL_0000 mvid 5279
     at JetBrains.Rd.Impl.SocketWire.Server.<>c__DisplayClass4_0.<StartServerSocket>b__0() in Server.il:line IL_002F mvid 22C3 or Server.il:line IL_00F6 mvid 22C3
     at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) in RunInternal.il:line IL_0079 mvid BC47
     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) in Run.il:line IL_0009 mvid BC47 or Run.il:line IL_0034 mvid BC47
     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) in Run.il:line IL_0009 mvid BC47 or Run.il:line IL_0034 mvid BC47
     at System.Threading.ThreadHelper.ThreadStart() in ThreadStart.il:line IL_002A mvid BC47
”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
HResult = COR_E_APPLICATION=80131600

2024.12.20 10:16:10.654    WARN Element <Tests.UnitTests.TheTest> was left Pending after its run completion.

By removing the "in" in type parameter TContext eliminates that error

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Dec 20, 2024
@huoyaoyuan
Copy link
Member

For non-static method, the compiler does report error about constraint:

public interface IInterface<TEntity, in TContext>
    where TEntity : IInterface<TEntity, TContext>
{
    public void Method<TEntityProperty>() // CS1961
        where TEntityProperty : IInterface<TEntityProperty, TContext>
    { }
}

However, there's no error for a static method with manual this;

    public static void Method<TEntityProperty>(IInterface<TEntity, TContext> @this)
        where TEntityProperty : IInterface<TEntityProperty, TContext>
    { 
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

No branches or pull requests

2 participants