I'm tryng ro fake a class from an external assemly.
That class has only an internal parameterless constructor and the project has the attribute InternalsVisibleTo correctly set.
I can call it from the test project, but if I try to generate a fake for that class I receive this error:
No parameterless constructor defined for type
I understand the logic behind not allowing private constructor but an internal constructor of an InternalsVisibleTo assembly should be allowed
LINQPad Code Example
i cant create a linq pad example because the problem is over 2 different projects/assembly
What alternatives have you considered?
I could set the constructor public but this is not an option for some of those classes
Description
I'm tryng ro fake a class from an external assemly. That class has only an internal parameterless constructor and the project has the attribute InternalsVisibleTo correctly set. I can call it from the test project, but if I try to generate a fake for that class I receive this error:
No parameterless constructor defined for type
I understand the logic behind not allowing private constructor but an internal constructor of an InternalsVisibleTo assembly should be allowed
LINQPad Code Example
i cant create a linq pad example because the problem is over 2 different projects/assembly
What alternatives have you considered?
I could set the constructor public but this is not an option for some of those classes
Could you help with a pull-request?
No