Hm, I just pulled a branch of mine that had one ve...
# pact-net
k
Hm, I just pulled a branch of mine that had one very simple contract test working. Now I'm getting this when running the Producer test
Copy code
Message: 
System.Net.HttpListenerException : The process cannot access the file because it is being used by another process.

  Stack Trace: 
HttpListener.AddPrefixCore(String registeredPrefix)
HttpListener.AddAllPrefixes()
HttpListener.Start()
MessagingProvider.Start(JsonSerializerSettings settings)
PactVerifier.MessagingProvider(String providerName, JsonSerializerSettings settings)
I originally thought that the access error is related to my pact file being used by some other process, but I don't know what that'd be. Also, I don't know why this is just now failing 🤔
Copy code
.WithFileSource(new FileInfo(pactPath))
I'm checking used ports on my machine to see if that's the reason.
Ran all the netstat commands, couldn't see anything listening. I read somewhere about some ghost-like connections that could remain open. Perhaps my consumer side of the contract opened the message provider and hung onto the port or something.
Anyways, I closed down everything and kept trying the test but had no luck. Eventually restarted my machine and now we're good.