Lokad / ILPack

Serialize .NET Core assemblies

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Non-public properties causing failure

Qwrk13 opened this issue · comments

commented

var eitherAccessor = propertyInfo.GetGetMethod() ?? propertyInfo.GetSetMethod();

PropertyInfo.GetGetMethod() and PropertyInfo.GetSetMethod() do not return non-public accessors, so for properties that were generated without a public accessor this line causes a failure. Changing this line to the below fixed my use case, would you mind incorporating that into the source? Thanks.
var eitherAccessor = propertyInfo.GetMethod ?? propertyInfo.SetMethod;

Thanks a lot! The version 0.1.1.0 now includes this fix.