coverlet-coverage / coverlet

Cross platform code coverage for .NET
MIT License
2.93k stars 385 forks source link

add JsonConstructorAttribute to `internal Method()` constructor #1586

Closed Bertk closed 5 months ago

Bertk commented 5 months ago

resolve #1583

daveMueller commented 5 months ago

@Bertk are you positive that this solves the problem? I tried it yesterday real quick with a self-compiled version and still faced this issue. Could be that I did something wrong but didn't have more time to investigate.

pinkfloydx33 commented 5 months ago

I hadn't had a chance to validate using the package from the CI pipeline and was going to try and do so momentarily. Will let you know if it fixes my issue

pinkfloydx33 commented 5 months ago

@daveMueller see my comment on #1583 . It does not fix it for me either and I don't think it will for anyone.

Bertk commented 5 months ago

@daveMueller No I was not convinced to solve the issue and ask for feedback.

In .NET 7 and earlier versions, the [JsonConstructor] attribute can only be used with public constructors.

@pinkfloydx33 Thank you for the analysis. I was not aware of this limitation.