dotnet / MQTTnet

MQTTnet is a high performance .NET library for MQTT based communication. It provides a MQTT client and a MQTT server (broker). The implementation is based on the documentation from http://mqtt.org/.
MIT License
4.39k stars 1.05k forks source link

RefSafetyRulesAttribute - Runtime Exception #2036

Open wms-bp opened 2 months ago

wms-bp commented 2 months ago

Describe your question

I am writing a driver for a sandboxed environment that runs Mono and supports .NETFramework 472. The sandboxed platform loads our assembly which references MQTTNet Nuget 4.3.6.1152. The platform uses a wrapped version of System.Reflection and upon calling GetTypes() on our assembly a System. TypeLoadException: RestrictionViolationException: System.Runtime.CompilerServices.RefSafetyRulesAttribute - Not allowed due to restrictions is thrown.

I've cloned the project and cannot find any usages of this attribute. I'm trying to figure out what might be causing this issue so I can build the project locally. Could anyone please offer any insight?

Thank you

Which project is your question related to?

chkr1011 commented 1 month ago

Sorry but I never heard of the Attribute before, and it is also not used in the repo in any version.