GitHub
06/14/2025, 1:34 PM@dependabot rebase.
---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
• @dependabot rebase will rebase this PR
• @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
• @dependabot merge will merge this PR after your CI passes on it
• @dependabot squash and merge will squash and merge this PR after your CI passes on it
• @dependabot cancel merge will cancel a previously requested merge and block automerging
• @dependabot reopen will reopen this PR if it is closed
• @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
• @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
• @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
• @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
• @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the Security Alerts page.
pact-foundation/pact-netRyan Child
06/18/2025, 3:00 PMZachary Lysobey
06/20/2025, 12:56 PMGitHub
06/20/2025, 2:19 PM<http://localhost:41952/pact-messages/>, it receive a 404 response without going through the HandleRequest method of MessageProvider.
If I modify the prefix uri with 127.0.0.1, then it works in all cases.
What is important is that the Uri added to the HttpListener must be 127.0.0.1. Then, the returned uri can be the ip or localhost it works in both cases.
I know it is connecting to the listener somehow because if I comment out the start of the HttpListener, then it cannot connect.
There is definetely something going in the middle with localhost but I can't figure it out.
Steps To Reproduce
I didn't succeed yet identifying what's going on.
Expected behavior
The listener should be able to receive pact_verifier request
Log Output
2025-06-20T13:58:12.662599Z DEBUG ThreadId(01) verify_interaction{interaction="A valid message"}: reqwest::connect: starting new connection: <http://127.0.0.1:49152/>
2025-06-20T13:58:12.662613Z DEBUG ThreadId(01) verify_interaction{interaction="A valid message"}: hyper_util::client::legacy::connect::http: connecting to 127.0.0.1:49152
2025-06-20T13:58:12.662888Z DEBUG ThreadId(01) verify_interaction{interaction="A valid message"}: hyper_util::client::legacy::connect::http: connected to 127.0.0.1:49152
2025-06-20T13:58:12.691760Z DEBUG ThreadId(01) verify_interaction{interaction="A valid message"}: hyper_util::client::legacy::pool: pooling idle connection for ("http", 127.0.0.1:49152)
2025-06-20T13:58:12.691815Z DEBUG ThreadId(01) verify_interaction{interaction="A valid message"}: pact_verifier::provider_client: Received native response: Response { url: "<http://127.0.0.1:49152/pact-messages>", status: 404, headers: {"content-type": "text/html", "server": "Microsoft-NetCore/2.0", "date": "Fri, 20 Jun 2025 13:58:12 GMT", "content-length": "30"} }
2025-06-20T13:58:12.691945Z INFO ThreadId(01) verify_interaction{interaction="A valid message"}: pact_verifier::provider_client: Received response: HTTP Response ( status: 404, headers: Some({"content-type": ["text/html"], "server": ["Microsoft-NetCore/2.0"], "date": ["Fri, 20 Jun 2025 13:58:12 GMT"], "content-length": ["30"]}), body: Present(30 bytes, text/html) )
2025-06-20T13:58:12.691967Z DEBUG ThreadId(01) verify_interaction{interaction="A valid message"}: pact_verifier::provider_client: body:
<h1>Not Found (Not Found)</h1>
pact-foundation/pact-netTiago Bernardo
06/25/2025, 3:26 PMJegadeesan Ponnusamy
06/26/2025, 3:29 PMdiscriminator , but the Pact.NET library doesn't seems to support this. Could you please let us know, how we should proceed further to test this? Thank you. https://docs.pactflow.io/docs/bi-directional-contract-testing/contracts/oas/keyword-support#general-adviceLindsay Duncan
07/03/2025, 2:25 PMAaron Small
07/07/2025, 5:09 AMusing var pactVerifier = new PactVerifier("MyService", config);
pactVerifier
.WithHttpEndpoint(new Uri("<http://localhost:5001>"))
.WithFileSource(new FileInfo(pactPath))
.Verify();
Thanks!GitHub
07/10/2025, 9:54 PM2025-07-10T21:23:11.928119Z ERROR ThreadId(01) pact_verifier::pact_broker: Failed to push branch refs/head/test for provider version test
2025-07-10T21:23:11.928223Z ERROR ThreadId(01) pact_verifier: Publishing of verification results failed with an error: Link/Resource was not found - Request to pact broker path '/pacticipants/myprovider/branches/refs%2Fhead%2Ftest/versions/test' failed: 404 Not Found. URL: '<https://pactbroker.com/>'
Steps To Reproduce
options.PublishResults(brokerConfig.ProviderVersion, publishOptions =>
{
publishOptions
.BuildUri("<http://test>")
.ProviderBranch("/refs/head/test");
});
Expected behavior
The provider verification result should be published to a branch with a slash. This is a supported value with the pact cli to publish consumer contract.
Log Output
See above
Additional context
Replacing / with - make it works.
pact-foundation/pact-netDavid Mason
07/11/2025, 2:22 PMPactVerifier.WithMessages doesn't exist.
Using pact-net 5.0.1
Is this a known issue? What can we do to verify a pact containing interactions with type Asynchronous/Message (pact specification v4)Bas Dijkstra
07/15/2025, 10:31 AMthis.verifier!
.WithHttpEndpoint(PactServiceUri)
.WithPactBrokerSource(new Uri(Environment.GetEnvironmentVariable("PACT_BROKER_BASE_URL")!), options =>
{
options
.TokenAuthentication(Environment.GetEnvironmentVariable("PACT_BROKER_TOKEN"))
.PublishResults(Environment.GetEnvironmentVariable("ADDRESS_PROVIDER_VERSION") ?? "1.0.0")
.ProviderBranch("main");
})
.WithProviderStateUrl(new Uri($"{PactServiceUri}provider-states"))
.Verify();
However, it doesn't seem to work, the ProviderBranch() call seems to be ignored. I'm using Pact .Net 5.0.0.Dominick Campbell
07/18/2025, 8:20 PMGitHub
08/01/2025, 6:46 PMPactHandle with pactffi_new_pact, it need to be freed with pactffi_free_pact_handle.
I implement Disposable interface but not sure how to handle unmanaged resource with finalizer.
BTW, I see that pactffi has a dedicated method for message interactions (pactffi_new_message_pact, pactffi_free_message_pact_handle) and use them. It doesn't change the way the consumer test generate its pact file.
pact-foundation/pact-netboden winkel
08/21/2025, 2:01 PMGitHub
08/25/2025, 10:31 AMGitHub
09/04/2025, 9:57 PMPactNet.Interop package as @adamrodger suggested in Issue #492 . This was not a breaking change since all the classes in this namespace were internal, PactNet now references this new package and none of the pre-existing interface methods have changed. Extracting this package made it possible to create bare-bones Grpc plugin tests and is effectively a very "raw" way of using any plugin. Perhaps a next step would be to wrap the bare-bones methods in a more fluent "raw" interface in a plugin package similar to implementations in other languages as @Matt (pactflow.io / pact-js / pact-go) suggested.
Based on above "raw" tests I was able to refactor and extract shared functionality to create a new PactNet.Extensions.Grpc library that provides a fluent interface similar to the interfaces for http / rest and asynchronous messaging interactions.
An alternative approach here would be to just add <InternalsVisibleTo Include="PactNet.Extensions.Grpc" /> to the PactNet.csproj file but this allows integration of other plugins in repos outside this one so it depends on whether you want to explicitly allow that or not.
pact-foundation/pact-netMartin
09/05/2025, 11:47 AMtext/plain instead of JSON.
What I’ve noticed:
• On the consumer side, the DSL only exposes helpers like WithJsonContent(...) which always serialize the messages to JSON. I don’t see a way to say "the body is raw text and the contentType is `text/plain`".
• On the provider side, when using .WithMessages(...).WithContent(...), any string gets serialized as JSON and the content type ends up application/json. I don’t see an overload that doesn't take the JsonSerializationOptions.
So essentially: I don’t see a way in PactNet to produce or verify a message pact where the body is plain text and the content type is text/plain.
👉 My questions:
• Is this a known limitation in PactNet?
• Or is there some sample code / workaround that shows how to handle non-JSON content types (like text/plain) in message pacts on .NET?
We’re using PactNet 5.0.1 (PactNet + PactNet.Abstractions).
Thanks in advance!GitHub
09/05/2025, 2:40 PMgit status you will see that PactNet.sln all line-endings have immediately changed. Potential solution is described in the accepted answer of the above referenced SO post.
Appears that the root cause may be that line endings were not renormalized (git add --renormalize .) when the .gitattributes file was added.
pact-foundation/pact-netPaul
09/12/2025, 5:17 AMElson Ho
09/19/2025, 2:31 AMGitHub
09/20/2025, 4:01 PM<https://github.com/pact-foundation/pact-net/tree/master|master> by adamrodger
<https://github.com/pact-foundation/pact-net/commit/8b8841d4074c17363fa22e62a105711e88eb24a4|8b8841d4> - Fix content creation syntax in messaging pacts
pact-foundation/pact-netGitHub
09/20/2025, 7:12 PM<https://github.com/pact-foundation/pact-net/tree/master|master> by adamrodger
<https://github.com/pact-foundation/pact-net/commit/3f59bf7cb00124635b6d421a033b2a4a72c4c3c9|3f59bf7c> - fix(#549): EditorConfig settings for sln files
pact-foundation/pact-netGitHub
09/30/2025, 10:43 AMGitHub
10/07/2025, 10:58 PMPactNet.Extensions.Grpc package I created in PR #548.
There may still be some design issues to consider. One thing to note is that Plugins can have both synchronous and asynchronous interactions so I made my builder specific to the synchronous use case so we can add an asynchronous version at some point.
pact-foundation/pact-netKieran McCarthy
10/11/2025, 10:49 AMGitHub
10/14/2025, 10:04 AMGitHub
10/15/2025, 5:09 AMGitHub
10/22/2025, 9:38 PMGitHub
10/22/2025, 9:43 PMDOTNET_NUGET_SIGNATURE_VERIFICATION to false
## Compatibility
### Operating System
Due to using a shared native library instead of C# for the main Pact logic only certain OSs are supported:
| OS | Arch | Support |
| ------------ | ----------- | ---------------- |
| Windows | x86 | ❌ No |
| Windows | x64 | ✔️ Yes |
| Linux (libc) | x86 | ❌ No |
| Linux (libc) | x64 | ✔️ Yes |
| Linux (musl) | x64 | ✔️ Yes (Tier 2)* |
| Linux (libc) | ARM | ✔️ Yes (Tier 3)* |
| Linux (musl) | ARM | ✔️ Yes (Tier 3)* |
| OSX | x64 | ✔️ Yes |
| OSX | ARM (M1/M2) | ✔️ Yes |
#### Support
• Tier 1
• Established
• Full CI/CD support.
• Users should not encounter issues
• Full reproducible examples running in CI, should be provided by users raising issues
• If using musl targets, users should attempt the same test on a libc target (such as debian)
• Tier 2
• Recently introduced
• Full CI/CD support.
• Users may encounter issues
• Full reproducible examples running in CI, should be provided by users raising issues
• If using musl targets, users should attempt the same test on a libc target (such as debian)
• Tier 3
• Recently introduced, No/limited CI/CD support.
• Users may encounter issues
• Full reproducible examples which can be run by maintainers locally, should be provided by users raising issues
pact-foundation/pact-netGitHub
10/22/2025, 9:44 PM