US - Oregon Portland CRM

 View Only
  • 1.  Updating existing plug-in code?

    Posted Feb 18, 2020 05:53 PM
    Edited by Leroi Dejesa Feb 18, 2020 05:55 PM
    Hi everyone, 

    Context:

    My organization's partner uses a subcontractor for plug-in development, and one of our current challenges is to update/expand on the logic on one of the plug-ins they've built out for us. I have coding experience so I've gone ahead and volunteered for the task.

    Digging into the documentation, I've found lots of info on creating/registering/deploying/debugging new plug-ins, however... when it comes to updating/editing plug-in code, every resource I've found assumes that the plug-in was either created locally, or exists as part of a remote repository that we have access to. 

    Neither is true, in our case. We didn't develop the plug-in originally, and we don't have access to that subcontractor's private repos. We do, of course, have full access and credentials to D365 itself. So...

    Question:

    Is it possible to somehow download and edit plug-in files without having access to source control? Or is our only choice to reach out to that subcontractor to send over a cloned repo?

    I've tried exporting and unzipping the solution that said plug-ins were packaged with, however it's only a single .dll file. I can't actually edit the code.

    Any tips, advice, or workarounds would be greatly appreciated!


  • 2.  RE: Updating existing plug-in code?

    MICROSOFT MVP
    Posted Feb 18, 2020 07:41 PM
    Edited by Seth Bacon Feb 18, 2020 07:50 PM
    When I have run across this in the past, the team had to go back to the original developer to get the source code. When the original developer is inaccessible, we evaluate if we can recreate the code or work around the black box depending on the need. I have heard of people decompiling code but not sure how well it went.

    Hoping that @Jonas Rapp​ or @Daryl LaBar might be able to give you some guidance on the best next steps.​

    ------------------------------
    Seth T. Bacon
    RSM
    ------------------------------



  • 3.  RE: Updating existing plug-in code?

    MICROSOFT MVP
    Posted Feb 18, 2020 08:01 PM
    Edited by Daryl LaBar Feb 18, 2020 09:52 PM
    There is no magic with plugins in CRM.  They are dlls that were compiled from source.  If your partner did not give you the source code before they left, shame on them,  your company may also deserve some blame in this as well, for not making sure they gave you the source code.  

    This gives your 2 options.
    1. Reach out to your subcontractor for the code.  Every SOW that I've ever seen says that the company paying for the work, owns the work.  Now it should be on your company to be responsible for maintaining the source for said work, but the contractor should be giving it to you at the end of the project.  So reach out, and ask for the code.
    2. Decompile the source code, manually convert it into a project you can build, and make the changes you need, being sure never ever to work with said contractor again, and doing whatever you can to share your experience with the rest of the world so that no one else works with them as well.

    You're going to want to do everything you can to go with Option 1, but if that doesn't work, I've done the ugly work of option 2, two or three times before, so you can feel free to reach out with a question or two.  If you need more support than a couple 5 minute questions, now that I have my own company, you can also contract directly with me and I'd be happy to do the work required.


    ------------------------------
    Daryl LaBar
    President, MVP
    Gap Integrity
    Fishers IN
    ------------------------------



  • 4.  RE: Updating existing plug-in code?

    Posted Feb 19, 2020 07:22 AM
    Edited by Rex Kenley Tan Feb 19, 2020 07:22 AM
    @Leroi Dejesa

    I was in your shoes years ago and I can tell you it is not that difficult to decompile dlls (this is pre .NET days). If you have no other option, go ahead and decompile that thing and be the hero at your work place. :)

    Here are some decompiling tools that you can use.
    https://www.jetbrains.com/decompiler/
    https://www.telerik.com/products/decompiler.aspx
    https://github.com/icsharpcode/ILSpy

    https://devblogs.microsoft.com/visualstudio/decompilation-of-c-code-made-easy-with-visual-studio/
    https://www.hanselman.com/blog/WhatsBetterThanILDasmILSpyAndDnSpyAreToolsToDecompileNETCode.aspx

    Probably the only thing that would complicate the process is if that is a "merged" dll, but that is rare.

    Cheers!

    ------------------------------
    Rex Kenley Tan, MCSA, MCSD
    Tallmadge OH
    https://www.youracclaim.com/users/rex-kenley-tan

    *Always be CURRENT with JavaScript & C#, NEVER be obsolete.

    DISCLAIMER: All views expressed on this site are my own and DO NOT represent the opinions of ANY entity whatsoever with which I have been, am now, or will be affiliated.
    ------------------------------



If you've found this thread useful, dive deeper into User Group community content by role