Skip to content

Verify.DocNet v2.1.1 throws Method not found: RegisterFileConverter #514

@gao-artur

Description

@gao-artur

Describe the bug

Verify.DocNet v2.1.1 throws MissingMethodException when used with the latest Verify version v31.17.0

System.TypeInitializationException: The type initializer for '' threw an exception. ---> System.MissingMethodException: Method not found: 'Void VerifyTests.VerifierSettings.RegisterFileConverter(System.String, VerifyTests.Conversion`1<System.IO.Stream>)'..
at VerifyTests.VerifyDocNet.Initialize() in C:\projects\verify-docnet\src\Verify.DocNet\VerifyDocNet.cs:line 12
at VerifyTests.VerifyDocNet.Initialize() in C:\projects\verify-docnet\src\Verify.DocNet\VerifyDocNet.cs:line 12

Seems to be related to

Note: we are using an old v2.1.1 because starting v3 SixLabors.ImageSharp requires a comertial licence.

Minimal Repro

Demo.cspoj

<Project Sdk="MSTest.Sdk/4.2.3">

  <PropertyGroup>
    <TargetFramework>net10.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
    <UseVSTest>true</UseVSTest>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Verify" Version="31.17.0" />
    <PackageReference Include="Verify.DocNet" Version="2.1.1" />
  </ItemGroup>

</Project>

Test1.cs

using System.Runtime.CompilerServices;

[assembly: Parallelize(Scope = ExecutionScope.MethodLevel)]
namespace Demo;

[TestClass]
public sealed class Test1
{
    [ModuleInitializer]
    public static void Init()
    {
        VerifyDocNet.Initialize();
    }

    [TestMethod]
    public void TestMethod1()
    {
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions