Friday, January 04, 2019

XrmToolbox–useful build settings

  1. ILMerge
    Used, when you have multiple assemblies and you need to package them together.
    Stage: Post Build Step
    Sample:

  2. ilmerge.exe /target:library /targetplatform:v4,"C:\Windows\Microsoft.NET\Framework\v4.0.30319" "/out:CombinedModuleName.dll" "inputModule1.dll" "inputModule2.dll" "inputModule3.dll"

  3. Copy the plugin to a plugins folder
    This makes it easier to tell XTB to load the dll you are developing

  4. if $(ConfigurationName) == Debug (
      IF NOT EXIST Plugins mkdir Plugins
      move /Y  "CombinedModuleName.dll" Plugins
    )
  5. Debug settings:
    Start external program: path to xrmtoolbox.exe
    Command line arguments:
    /plugin:"NameOfThePlugin" /overridepath:"path to the parent of plugin folder" /connection:"specific connection if you want to use one"

    Note: in step 2, we create a folder called Plugins under the debug output folder (eg: {ProjectName}\bin\Debug\Plugins). The path that OverRidePath should point to is the Debug folder. The reason is that XTB will look for a sub-folder called plugins to locate the plugin.

For more information: https://github.com/MscrmTools/XrmToolBox/wiki/Debug-your-plugins-during-development

No comments: