Unable to pass httpClient in Provided Client constructor anymore
See original GitHub issueDescription
error FS0001: This expression was expected to have type ‘Text.Json.JsonSerializerOptions’ but here has type ‘HttpClient’
and also trying with empty constructor as well…
Severity Code Description Project File Line Suppression State Error FS3033 The type provider ‘SwaggerProvider.SwaggerTypeProvider’ reported an error: Constructor ‘Void .ctor(System.Net.Http.HttpClient)’ not found in type ‘tgt type Swagger.ProvidedApiClientBase’. This constructor may be missing in the types available in the target assemblies. Travix.Mockery.Provided C:\Git\travix.mockery\src\Acme.Mockery.Provided\ProvidedTypes.fs 12 Active
Repro steps
let client = new ProvidedTypes.Enosis.Client(httpClient)
try to assign httpClient to a generated provided client from the constructor
Expected behavior
I can still use the same signature constructor as before, passing httpClient
Actual behavior
The constructor doesnt have that public signature anymore
Known workarounds
No known workarounds…
Related information
- Windows 10
- beta-4 (preview package)
- NET5
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (15 by maintainers)
Top GitHub Comments
@jkone27 so can this be closed then?
@jkone27 report it please, it is definitely looks weird.