XC 10 - Tip #6: When the docs fails -ILSpy
unsplash.com - Chris Yang

XC 10 - Tip #6: When the docs fails -ILSpy

The best documentation is the code. And the code you need, especially when replacing for example a pipeline block where you have to ensure it keeps working as expected. Especially with Sitecore Commerce, I live in ILSpy.

For code to be the documentation, the code must be readable! We are so lucky that Sitecore did not obfuscate its code so tools like DotPeek (free) and ILSpy (free and open-source) can be used. So actually Sitecore is kind of "open source" :-) I personally prefer ILSpy because my machine is getting really slow when running Sitecore Commerce, and ILSpy keeps doing its job. DotPeek seems more powerful but almost unusable on my laptop. I should have gone for the 32GB Dell laptop I was offered, but I did fall for the shiny Microsoft Surface Book 2. But back then I didn't know I was going to do Sitecore Commerce development, I was just hacking away in React:-)

Just like with NDepend as described in XC 10 - Tip #5, I load the complete set of assemblies of:

  • CommerceEngine - with the assemblies of my Sitecore.Commerce.Engine main project in the folder Sitecore.Commerce.Engine\bin\Debug\netcoreapp3.1.
  • Storefront - with the assemblies of the XP website in the folder c:\inetpub\wwwroot\<XC10storefrontSite>\bin.

ILSpy does not support projects, so I have to switch by deleting all assemblies and loading the new set. If anyone once a trick to start ILSpy with a given folder to load assemblies from I would be really helped!

Some small tips when using ILSpy:

  • I get the best results if I select C# 9.0 in the language selector
  • You can decompile to a new tab (right-click on class/method and select Decompile to new tab, or press the middle mouse button (press the scroll-wheel on my mouse)
  • You can analyze a class/method/property/... by a right-click on it and select Analyze, or press CTRL-R. In the Analyze window you can search for the Uses, Used By, and Instantiated By to navigate through the code-base
  • ILSpy has a powerful and fast search through all assemblies. Press the search icon in the top or press CTRL-SHIFT-F.
  • To search in the current tab press CTRL-F.

要查看或添加评论,请登录

Serge van den Oever的更多文章

  • SUGCON 2024 - my three cents...

    SUGCON 2024 - my three cents...

    Jason St-Cyr from Sitecore, although unable to attend the SUGCON conference in Dublin in person, provided insightful…

    2 条评论
  • Sitecore User Group Netherlands meeting @ Macaw

    Sitecore User Group Netherlands meeting @ Macaw

    Tuesday, September 27 the Dutch Sitecore User Group (SUGNL) came together at the Dutch headquarters of Macaw in the…

    1 条评论
  • What do we know about XM Cloud?

    What do we know about XM Cloud?

    As Sitecore MVPs, we had different sessions with Sitecore the last few months to keep us up to date on what is…

  • Sitecore demo portal ain't no XM Cloud

    Sitecore demo portal ain't no XM Cloud

    After my stupid blunder of mixing up Sitecore demo portal and XM Cloud I had to rewrite some blog posts[1][2], and do…

  • Azure Fluid Relay and Fluid Framework

    Azure Fluid Relay and Fluid Framework

    Microsoft made a great managed cloud service available on Azure called Azure Fluid Relay that enables Fluid Framework…

  • DynaMail - send data-driven, multi-language emails - replace Sitecore EXM

    DynaMail - send data-driven, multi-language emails - replace Sitecore EXM

    For a Sitecore Experience Commerce project we needed to send out emails on placed orders, but could not use EXM due to…

  • Boxever - my first baby steps

    Boxever - my first baby steps

    After doing the Boxever Advanced Certification I was lucky enough to get access to a Boxever sandbox. I will post my…

    1 条评论
  • XC 10 - Tip #8: When assembly hell breaks loose - hunt & fix

    XC 10 - Tip #8: When assembly hell breaks loose - hunt & fix

    Just a few days before a big milestone, we need to deliver our Sitecore Commerce solution to a customer, Sitecore…

    1 条评论
  • XC 10 - Tip #7: When the docs fails - Google

    XC 10 - Tip #7: When the docs fails - Google

    Ok, a bit of an obvious one: if you need an answer, you Google. But if you hit a Sitecore documentation page in most…

  • XC 10 - Tip #5: When the docs fails -NDepend

    XC 10 - Tip #5: When the docs fails -NDepend

    With a large software product like Sitecore with a huge code-base, it is difficult to get a good overview of how…

社区洞察

其他会员也浏览了