PactNet - the type or namespace name 'PactVerifierConfig' could not be found

93 Views Asked by At

I'm trying to write a PactNet Provider test for my dotnet 7 web api. I've installed the nuget package PactNet into my test proj and I see I have version 4.5 installed:

    <PackageReference Include="PactNet" Version="4.5.0" />

I've added the using statement on my test:

using PactNet;

but when I try to instantiate the config it says the class can't be found:

        var config = new PactVerifierConfig();

        IPactVerifier pactVerifier = new PactVerifier(config);

I've already tried the following:

Cleaned and rebuilt the project. Removed and re-added the PactNet nuget package. Restarting VS Code.

1

There are 1 best solutions below

0
SnowBall88 On

Needed to add the following using statement:

using PactNet.Verifier;