Error compiling WireMock.NET #382

Closed
opened 2025-12-29 15:22:25 +01:00 by adam · 1 comment
Owner

Originally created by @devmariodiaz on GitHub (Nov 9, 2021).

Hello Stef,

Hoping that you are doing well.

I have a question.

I'm trying to compile WireMock Solution, to do a debug adding this project as a reference in my project, but I'm getting these errors:

/Users/xxx/Projects/WireMock.Net/src/WireMock.Net/Http/HttpClientBuilder.cs(17,17): Error CS0117: 'HttpClientHandler' does not contain a definition for 'ServerCertificateCustomValidationCallback' (CS0117) (WireMock.Net).

/Users/xxx/Projects/WireMock.Net/src/WireMock.Net/Http/HttpClientBuilder.cs(25,25): Error CS1061: 'HttpClientHandler' does not contain a definition for 'ClientCertificates' and no accessible extension method 'ClientCertificates' accepting a first argument of type 'HttpClientHandler' could be found (are you missing a using directive or an assembly reference?) (CS1061) (WireMock.Net)

Do you know what is happening with this?

In addition to that, I'm using .NET 5.0.403 and Visual Studio for mac OS as well.

Originally created by @devmariodiaz on GitHub (Nov 9, 2021). Hello Stef, Hoping that you are doing well. I have a question. I'm trying to compile WireMock Solution, to do a debug adding this project as a reference in my project, but I'm getting these errors: /Users/xxx/Projects/WireMock.Net/src/WireMock.Net/Http/HttpClientBuilder.cs(17,17): Error CS0117: 'HttpClientHandler' does not contain a definition for 'ServerCertificateCustomValidationCallback' (CS0117) (WireMock.Net). /Users/xxx/Projects/WireMock.Net/src/WireMock.Net/Http/HttpClientBuilder.cs(25,25): Error CS1061: 'HttpClientHandler' does not contain a definition for 'ClientCertificates' and no accessible extension method 'ClientCertificates' accepting a first argument of type 'HttpClientHandler' could be found (are you missing a using directive or an assembly reference?) (CS1061) (WireMock.Net) Do you know what is happening with this? In addition to that, I'm using .NET 5.0.403 and Visual Studio for mac OS as well.
adam added the question label 2025-12-29 15:22:25 +01:00
adam closed this issue 2025-12-29 15:22:25 +01:00
Author
Owner

@devmariodiaz commented on GitHub (Nov 9, 2021):

Please forget this,
I solved it.

I only left this tag as follows:
<TargetFrameworks>net5.0</TargetFrameworks>

Instead of:
<TargetFrameworks>net5.0;net451;net452;net46;net461;netstandard1.3;netstandard2.0;netstandard2.1;netcoreapp3.1</TargetFrameworks>

@devmariodiaz commented on GitHub (Nov 9, 2021): Please forget this, I solved it. I only left this tag as follows: `<TargetFrameworks>net5.0</TargetFrameworks>` Instead of: `<TargetFrameworks>net5.0;net451;net452;net46;net461;netstandard1.3;netstandard2.0;netstandard2.1;netcoreapp3.1</TargetFrameworks> `
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net-wiremock#382