Thanks for reaching out!
You have encountered an anonymous delegate in your assembly that was not present in the previous builds of your app. This could be due to a few different reasons, often linked to the use of Lambda expressions or AddressOf references that are not directly associated with named methods.
Here are some steps you can take to identify the code that introduced the VB$AnonymousDelegate_0 entry:
- Check for Lambda Expressions: Look through your code for any Lambda expressions that might be creating delegates. For example, if you are using LINQ or event handling, this might result in an anonymous delegate being generated.
- Inspect Delegate Usage: Search for instances where you might be using the
AddressOfoperator, as this can also generate anonymous delegates if the method referred to is not named. - Look into Event Handling: If you're implementing event handlers using
AddHandler, review those sections of code to see if any anonymous methods are being created. - Review Recent Changes: Compare your current code with older versions to spot recent additions or changes that could involve delegate usage.
References: https://learn.microsoft.com/en-us/dotnet/visual-basic/programming-guide/language-features/delegates/
https://learn.microsoft.com/en-us/dotnet/visual-basic/programming-guide/language-features/delegates/
https://learn.microsoft.com/en-us/dotnet/visual-basic/programming-guide/concepts/object-oriented-programming
Let me know if you need any further help with this. I will be happy to assist.
If you find this helpful, Kindly mark the provided solution as "Accept Answer", so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.