.NET 3.1 Support On Windows
See original GitHub issueWhen using Pact on Windows for .NET 3.1, it fails to work (even with long path support enabled). As mentioned in #242 already, I have tried upgrading the sample application and tests to .NET 3.1 and they fail.
Here’s one of the stack traces after upgrading the tests to .NET 3.1:
X Consumer.Tests.EventsApiConsumerTests.CreateEvent_WhenCalledWithEvent_Succeeds [1ms]
Error Message:
System.AggregateException : One or more errors occurred. (One or more errors occurred. (No connection could be made because the target machine actively refused it.)) (The following constructor parameters did not have matching fixture data: ConsumerEventApiPact data)
---- System.AggregateException : One or more errors occurred. (No connection could be made because the target machine actively refused it.)
-------- System.Net.Http.HttpRequestException : No connection could be made because the target machine actively refused it.
------------ System.Net.Sockets.SocketException : No connection could be made because the target machine actively refused it.
---- The following constructor parameters did not have matching fixture data: ConsumerEventApiPact data
Stack Trace:
----- Inner Stack Trace #1 (System.AggregateException) -----
at PactNet.Mocks.MockHttpService.Host.RubyHttpHost.Start() in C:\Users\AshleyPoole\Downloads\pact-net-master-3\pact-net-master\PactNet\Mocks\MockHttpService\Host\RubyHttpHost.cs:line 66
at PactNet.Mocks.MockHttpService.MockProviderService.Start() in C:\Users\AshleyPoole\Downloads\pact-net-master-3\pact-net-master\PactNet\Mocks\MockHttpService\MockProviderService.cs:line 137
at PactNet.PactBuilder.MockService(Int32 port, JsonSerializerSettings jsonSerializerSettings, Boolean enableSsl, IPAddress host, String sslCert, String sslKey) in C:\Users\AshleyPoole\Downloads\pact-net-master-3\pact-net-master\PactNet\PactBuilder.cs:line 101
at PactNet.PactBuilder.MockService(Int32 port, Boolean enableSsl, IPAddress host, String sslCert, String sslKey) in C:\Users\AshleyPoole\Downloads\pact-net-master-3\pact-net-master\PactNet\PactBuilder.cs:line 70
at Consumer.Tests.ConsumerEventApiPact..ctor() in C:\Users\AshleyPoole\Downloads\pact-net-master-3\pact-net-master\Samples\EventApi\Consumer.Tests\ConsumerEventApiPact.cs:line 28
----- Inner Stack Trace -----
at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean allowHttp2, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
----- Inner Stack Trace -----
at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
----- Inner Stack Trace #2 (Xunit.Sdk.TestClassException) -----
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Download .NET Core 3.1 (Linux, macOS, and Windows)
NET Core 3.1 downloads for Linux, macOS, and Windows. .NET is a free, ... NET Desktop Runtime 3.1.32; Language support: C# 8.0: F#...
Read more >.NET and .NET Core official support policy - Dot.net
Learn about .NET and .NET Core support policies, which refer to several technologies including the runtime, ASP.NET Core and Entity Framework Core.
Read more >.NET Core 3.1 will reach End of Support on December 13, ...
.NET Core 3.1 will reach end of support on December 13, 2022. After that date, Microsoft will no longer provide servicing updates or...
Read more >What's new in .NET Core 3.1
.NET Core 3.1 is an LTS release with support from Microsoft for three years after its release. It's highly recommended that you move...
Read more >NET Core 3.1 Update
NET Core 3.1 has been refreshed with the latest update as of July 13, 2021. This update contains reliability and other non-security fixes....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think the issue isn’t long path support on Windows but rather the Ruby runtime used by Pact, hence why shallow directory paths work. Sadly this isn’t possible for all projects.
Working fine for me on 3.1, just had to move my code to a shallow directory.