Hi, @LulaczTV,
Thank you for providing the code sample and csproj file. I can see from the csproj file that you are using Unity. Unity performs code stripping to remove unreachable code. Unfortunately it can sometimes get it wrong, especially when code is referenced dynamically at runtime. I would recommend disabling code stripping and see if the problem is resolved. If so, you can try adjusting the level of stripping. You can also create a link.xml file that preserves particular types, methods, and properties.
Sincerely,
James