title: Problem of Xunit.net TestOutputHelper not working with C# Library project
body: <p><strong>TEST ENVIRONMENT:</strong></p>
  <p>.NET 6 console app with a class library in C#
  Visula Studio 2022
  Packages:<br />
  Xunit 2.4.2
  Xunit.runner.visualstudio 2.4.3</p>
  <p><strong>PROBLEM DESCRIPTION:</strong></p>
  <p>I was testing output messages to Xunit test result using TestOutputHelper (provided in XUnit.sdk)</p>
  <p>The output message works properly when unit tests against objects in console app: XunitCollection.</p>
  <p>But, it does not work when testing against objects in class library: ServiceManager (see details in the test output at the end). There is no compiler error.  The ServiceManager was added as project reference in ServiceManagerTest.</p>
  <p>Why it works when testing against C# console app, but not when testing against class library?</p>
  <p><strong>TESTING CODE:</strong></p>
  <p>----- Class Randomizer to be tested in IBRARY: SeviceManager ----</p>
  <pre><code>{
      public class Randomizer
      {
          public int RndNumber { get; private set; }
          private Random _rnd;
          public Randomizer()
          {
              _rnd = new Random();
              RndNumber = _rnd.Next();
          }
  
          public void RandomWithRange(int lower, int upper)
          {
              RndNumber = _rnd.Next(lower, upper);
          }
      }
  }
  </code></pre>
  <p>------ Unit Test Case ------</p>
  <pre><code>using Xunit;
  using Xunit.Sdk;
  
  namespace ServiceManagerTests
  {
      public class OutputMessageTest
      {
          private TestOutputHelper _outHelper;
  
          public OutputMessageTest(TestOutputHelper outHelper)
          {
              _outHelper = outHelper;
          }
  
          [Fact]
          public void WriteMessageTest()
          {
              _outHelper.WriteLine(&quot;First Message added to the test result&quot;);
  
              Assert.True(true);
          }
      }
  }
  </code></pre>
  <p>------ Output from Failed Test ------</p>
  <pre><code>﻿ ServiceManagerTests.OutputMessageTest.WriteMessageTest
    Source: OutputMessageTest.cs line 16
    Duration: 1 ms
  
    Message: The following constructor parameters did not have matching fixture data: TestOutputHelper outHelper
  </code></pre>