Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Answered

Appsource Solution checker giving error il-avoid-lock-plugin

Posted on by 745

Hi guyz

I have been trying to do solution Checker  in make.powerapps.com

and it is giving the error  

Issue : "il-avoid-lock-plugin"  which is coming due to Newtonsoft.dll 

Type :Newtonsoft.Json.Serialization.MemoryTraceWriter

Issue 

A plug-in or workflow activity assembly was identified as using the following pattern: System.Void System.Threading.Monitor.Enter(System.Object, System.Boolean). The use of lock statements in plug-ins or workflow assemblies are generally used for auto numbering solutions and can cause stability or performance issues. Avoid using lock statements in plug-in transactions. If you are using this for auto numbering please use the platform auto number feature.

how can i remove this issue to pass the solution checker for solution

below is screenshot 

pastedimage1617627371985v1.png

  • MMK Profile Picture
    MMK 745 on at
    RE: Appsource Solution checker giving error il-avoid-lock-plugin

    Thnx Guido

    i think i have to go with second solution

  • Guido Preite Profile Picture
    Guido Preite 54,081 Super User 2024 Season 1 on at
    RE: Appsource Solution checker giving error il-avoid-lock-plugin

    then in my opinion you have two options:

    1) you don't publish in app source

    2) you don't use newtonsoft library merged

    of course this is my opinion, maybe others will have other suggestions for your scenario

    hope it helps

  • MMK Profile Picture
    MMK 745 on at
    RE: Appsource Solution checker giving error il-avoid-lock-plugin

    that's needed to upload solution on AppSource

  • Guido Preite Profile Picture
    Guido Preite 54,081 Super User 2024 Season 1 on at
    RE: Appsource Solution checker giving error il-avoid-lock-plugin

    then don't use solution checker, it's not mandatory

  • MMK Profile Picture
    MMK 745 on at
    RE: Appsource Solution checker giving error il-avoid-lock-plugin

    i can't use json without newtonsoft because first the JSON we is very dynamic and huge json

    second there are so many plugins using different jsons so it might be very very......... difficult to update all plugins written years before and in production

    Any other way out for this

  • Verified answer
    Guido Preite Profile Picture
    Guido Preite 54,081 Super User 2024 Season 1 on at
    RE: Appsource Solution checker giving error il-avoid-lock-plugin

    if you use to manipulate json you can also do that without newtonsoft library, for example:

    www.crmanswers.net/.../json-and-crm-sandbox-plugins.html

    so identify the portion of code where you are using newtonsoft and try to find an alternative

    hope it helps

  • MMK Profile Picture
    MMK 745 on at
    RE: Appsource Solution checker giving error il-avoid-lock-plugin

    Thanks Guido for reply

    How can i merge newtonsoft in my Plugin Assembly then any help

    can't remove as newtonsoft is extensively used in plugins

  • Suggested answer
    Guido Preite Profile Picture
    Guido Preite 54,081 Super User 2024 Season 1 on at
    RE: Appsource Solution checker giving error il-avoid-lock-plugin

    probably the assembly of the error is IL merged with newtonsoft dll and the checker found that a method of that dll is not allowed.

    without knowing other details my suggestion is to don't IL merge assemblies

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans