PactNet - 找不到类型或命名空间名称“PactVerifierConfig”

问题描述 投票:0回答:0

我正在尝试为我的 dotnet 7 web api 编写 PactNet Provider 测试。 我已经将 nuget 包 PactNet 安装到我的测试项目中,我看到我安装了 4.5 版:

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

我在测试中添加了 using 语句:

using PactNet;

但是当我尝试实例化配置时,它说找不到该类:

        var config = new PactVerifierConfig();

        IPactVerifier pactVerifier = new PactVerifier(config);

我已经尝试过以下方法:

清理并重建项目。 删除并重新添加 PactNet nuget 包。 重新启动 VS 代码。

.net pact pact-net
© www.soinside.com 2019 - 2024. All rights reserved.