I have a web part which I’d like to add a custom icon to. I am using the CatalogIconImageUrl property in the web part schema (let’s say the value is _catalogs/masterpage/MyFolder/MyWebPartResources/MyWebPart_16x16.png).
If I deploy the web part to my development site it finds the path properly.
However, if I am deploying the web part to multi-tier site, it just does not find the URL. For example, if I am deploying the web part to a site collection like http://mysitecollection/SitePages/ or a personal SP site, like http://mysitecollection/my/personal/UserName/
Is there a work around for this?
chris_walker provided me with this help.
I’ve added an event receiver to the feature. After that I’ve retrieved the web app root in the Feature Activated method. Finally, I’ve opened the webpart schema as a txt file and replaced one keyword (~sitecollection) with the real site collection URL.