Seems to be an open issue: https://github.com/pact-foundation/pact-net/issues/530
Adding WithHttpEndpoint(new Uri("http://localhost:49152")) before WithMessages is a work around.
WithHttpEndpoint(new Uri("http://localhost:49152"))
WithMessages