Closed anantashrit closed 2 years ago
Hello @anantashrit, thanks for using EmbedIO... or, should I say, for trying.
The cause of the exception seems to be the .NET Native compiler stripping metadata (i.e. attributes) from all your controller methods by default.
You can tell the compiler which attributes to retain by adding a runtime directives file to your application.
Having never written a Xamarin app, much less for UWP, I am unable to give you better directions, but I hope I've put you on the right track.
Closing this issue as this is not a problem with EmbedIO: as a matter of fact, it affects any code that uses reflection.
Hi,
I am using EmbedIO in my Xamarin application. As of now I have only one target i.e., UWP. No andriod or ios. I use following code to create a WebServer -
Works fine in debug mode. But in Release mode this piece of code throws the error -
System.Reflection.MissingRuntimeArtifactException: Cannot retrieve a MethodInfo for this delegate because the method it targeted (System.ComponentModel.TypeConverter.ConvertFromInvariantString(String)) was not enabled for metadata using the Dynamic attribute. For more information, please visit http://go.microsoft.com/fwlink/?LinkID=616868
I know this is not exactly EmbedIO error. But I have tried to declare many types, namespaces from the library, EmbedIO in Default.rd.xml but no success. I would really appreciate if someone can configure Default.rd.xml.
Thanks, Anant