We came across an issue with an upgrade from CRM 4 to CRM 2011 where the images were all messed up, transparency was gone and had pixelated images, there were over 100 custom entities and download/uploading these manually was not an option.
Here’s a small bit of code to download image web resources from Dynamics CRM 2011.
private static void DownloadIcons(IOrganizationService sdk, string path)
{ QueryExpression qe = new QueryExpression("webresource"); qe.ColumnSet = new ColumnSet("name", "webresourcetype", "content", "displayname");
// 7 = gif, 10 = ico
qe.Criteria.AddCondition(...