Quicktip: Debugging merged plugin assembly

Plugin profiling and debugging is a very useful feature in the plugin registration tool. It helps you to debug and step through the plugin code in your local machine with Visual Studio, using the serialised plugin context. The serialised context can also be stored in CRM and debug can be initiated from this record.

Profile Screen

There is one small issue when you try to debug a IL Merged assembly. When you try to profile such a plugin assembly, you will get an error like this.

PluginRegTool Error

The error is saying that the plugin profiler cannot locate the assembly that was merged with the main plugin assembly.

Resolution:

Copy all the assemblies that were merged with the plugin assembly that you are trying to debug, into the same directory as the Plugin Registration tool executable.

I experienced this issue when I was trying to debug a plugin assembly merged using the CRM Solution Manager.

Further reading:

Debug a plugin – https://msdn.microsoft.com/en-us/library/gg328574.aspx

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s