Solution History

The other day, I was investigating some solution import issues, and I need to see who was guilty of importing a solution into an environment that it should never have been imported into.

I fired up the old XrmToolbox, to use the Plugin called Solution History which I always found a nice handy little tool for getting at the history of when and who imported solutions.

It was at that point that I realised that CRM now supports a Solution History view within the user interface. I have no idea when this appeared, but it seems to be sometime this year.

Since then, I have found this invaluable for investigation solution issues, and also for updating environments where you need to follow the exact pattern of solution imports that were done within a test environment.

To use it, simply get to your Settings area of Dynamics, and choose Solution History from within the Customization section.

This will then give you a nice list of the solutions that were imported, exported, succeeded and failed.

Adxstudio 7 solutions do not import into Dynamics 365 V9

Here is a bit of useless information for you!

I setup a trial of a V9 instance of Microsoft Dynamics 365 for some testing, and I found that the Adxstudio 7 solutions would not import.  The installer goes in, but installing the base portals solution fails.

To get round this, I converted the instance to a sandbox, reset it to V8.2, installed the solutions, and I intend to upgrade it to V9, although I will have to wait a week for the scheduled update to work.

So there you have it.  You cannot set up a new V9 instance to run old portal code on.

Solution export error, check SLA’s

Recently I had an issue where all of a sudden, a solution would not export from the development environment, even though it was previously fine, and as far as I knew, it had not changed.  Dynamics would throw a very unhelpful error, with no details of what went wrong.

I tried creating a new solution, and adding the exact same components and that one also failed, so I knew it was not the solution itself, but its contents.

After a bit of trial and error, I discovered that it was the SLA’s that were causing the issue.  Turns out that it was because one of the SLA’s had not been activated.  Never thought it needed to be, but in this case, it was causing an issue.

So, if it ever happens to you, make that one of the first things you check, it might save you some time.

This was a version 8.2 on premise install, but I didn’t have access to the actual server.

Microsoft.Crm.Entities.PluginType and PluginTypeNode: System.Xml.XmlElement caused an exception

I was getting this error when trying to import a solution into an On Premise Dynamics 365 environment.

This was a solution that I knew had previously imported into other environments, so I was very confused why it would not import.  Turns out, the Sandbox Processing Service on the server was not actually running.

Restarting the Service allowed the solution import to proceed.

I believe this must have happened as we had experienced a power cut, and I have certainly seen Dynamics services not restart properly when a server is not safely switched off correctly.  Also, it may have had something to do with the fact that this one little Virtual Machine server was running about 20 different CRM Organisations at once.

Anyway, never assume that its an issue with your solution.  Nine times out of ten, it is, but always remember to check your environment as well.

 

Portals Support added to CRM Utilities for Visual Studio

Get it on the Marketplace

I have updated my extension to support publishing of files from Visual Studio to Microsoft Dynamics Portals.

The tool now supports publishing files to Web Templates and Web Files, allowing you to use Visual Studio to edit and track changes of your portal related files, and quickly update Dynamics with the appropriate Portal files.

Web Files and Web Templates are simply listed within the Web Resource linker dialog for you to select.  You can then publish the appropriate files within your Visual Studio solution to Dynamics.

If you have installed the extension from the Marketplace, then it should prompt you to update, but if not, you can get it from the below link.

CRM Utilities for Visual Studio

System.MissingMethodException: Method not found: ‘!!0[] System.Array.Empty()’

UPDATE : Turns out this is down to compiling the Plugin with the .NET Framework 4.6 as opposed to 4.5.2.

Interesting new error message spotted in Microsoft Dynamics 365.

Not sure when this “new functionality” crept in to Dynamics, but if your developing and deploying plugins, watch out for this message.

It turns out that something has changed with the Trace Service and the Trace method in that if you try and do the following, you get the error:


ITracingService trace = context.GetExtension<ITracingService>();

trace.Trace("This message will cause an error");

Will give you the following error message :


System.MissingMethodException: Method not found: '!!0[] System.Array.Empty()'

Now this only seems to affect new plugins uploaded to Dynamics as I have a number of plugins already in there that has this kind of code.

The solution is to do something like the below:


ITracingService trace = context.GetExtension<ITracingService>();

trace.Trace("This message will cause an error {0}",string.Empty);

Very strange.  Just blogging about it in the hope that if someone googles that message, they will find a solution.

My utilities are now on the Visual Studio Marketplace

Just a quick update to say that all of my Visual Studio extensions are now on the Microsoft Visual Studio Marketplace, and are available to download and install direct from Visual Studio.

Visual Studio Marketplace

Simply go into the Tools menu and choose Extensions and Updates, select Online and search for me, James Hall.  My extensions are the top two in the list.

In theory, if you install them this way, you should get notified of when I update them.