Skip to content

Getting an Arg_GetMethNotFnd error with PageIterator when publishing project #2944

@felix-leducsimard

Description

@felix-leducsimard

Describe the bug

When publishing my blazor wasm projet I am getting an Arg_GetMethNotFnd error when trying to use the PageIterator with a method that uses a generic method when publishing my project. I assume it is related to the trimming of the project.

Image

Image

Expected behavior

I expect that since the project works in localhost, for it to work when publishing the project

How to reproduce

Create a Blazor WASM project and use a generic method to use the page iterator, publish to project to an IIS server and try to use the page iterator

` public static async Task<IEnumerable> GetAllFromIterator<T, T2>(GraphServiceClient client, T2 collectionResponse) where T2 : IParsable, IAdditionalDataHolder, new()
{
var response = new List();

 var pageIterator = PageIterator<T, T2>.CreatePageIterator(client, collectionResponse,
     (tObject) =>
     {
         response.Add(tObject);
         return true;
     },
     (req) =>
     {
         req.Headers.Add("ConsistencyLevel", "eventual");
         return req;
     }
     );

 await pageIterator.IterateAsync();

 return response;

}`

SDK Version

5.83.0

Latest version known to work for scenario above?

No response

Known Workarounds

By removing the genric part of the method the page iterator works when publishing

Image

Debug output

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugA broken experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions