Skip to content

MissingRuntimeArtifactException on ServiceModel.Syndication.SyndicationFeed.Load #65218

Open
@pkar70

Description

@pkar70

Description

I got:

System.Reflection.MissingRuntimeArtifactException
  HResult=0x8013151A
  Message=Cannot retrieve a MethodInfo for this delegate because the method it targeted (System.ServiceModel.Syndication.SyndicationFeedFormatter.DefaultUriParser(XmlUriData, Uri&)) was not enabled for metadata using the Dynamic attribute. For more information, please visit http://go.microsoft.com/fwlink/?LinkID=616868
  Source=<Cannot evaluate the exception source>
  StackTrace:
<Cannot evaluate the exception stack trace>

on Load:

            Using oReader As Xml.XmlReader = Xml.XmlReader.Create(New IO.StringReader(sPage))
                oRssFeed = ServiceModel.Syndication.SyndicationFeed.Load(oReader)
            End Using

I tried it with nuget 4.5.0, 5.0.0, 6,0,0,, and 6.0.2-mauipre.1.22054.8.
It happens only when building as Release, doesn't happen in Debug build.
Initially, this Load was in Class Library .Net Standard 2,0; as it has errors, I moved it into normal UWP app. But error persist.
I also tried to switch off "Enable optimizations" in project options, "Compile", "Advanced Compile Options".

Reproduction Steps

See above.

Expected behavior

Ability to build Release version.

Actual behavior

See above.

Regression?

No response

Known Workarounds

Using RSS from UWP, but I want to use RSS in Class Library, and reuse it in both Platform Uno and MAUI project

Configuration

Both in Class Library .Net Standard 2.0 and in standard UWP app.
Microsoft Windows [Version 10.0.19044.1526]
Architecture x86

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions