I have a Visual Studio 2013 solution that includes a custom action (ribbon button). I have created two icon files (16x16 and 32x32), and I want them deployed as part of my solution. Everything else is working perfectly: my button is enabled correctly, and my JavaScript runs perfectly. But I'm struggling with where to put the icon files. In my VS project, I choseAdd, SharePoint "Images" Mapped Folder. This created a folder in my project called Images, with a subfolder calledMyProjectName. I right-clicked that folder and chose Add, Existing Item, and navigated to my icon files. They now appear in my VS solution. When I click on the VS icon item, the Properties window shows a deployment location of {SharePointRoot}\Template\Images\MyProjectName\. So far so good.
But what do I put in my Elements.xml file? In the <CommandUIExtension><CommandUIDefinitions><CommandUIDefinition ... element, there are two attributes: Image16by16 and an Image32by32. Exactly what do I put in there? I tried/_layouts/images/MyProjectName/MyIcon16.png but when I deploy, my ribbon icon is garbled. The rendered HTML shows/_layouts/images/MyProjectName/MyIcon16.png, which is exactly what Elements.xml specifies. But the icon image is just a placeholder. Where is VS deploying my icon to? For each icon in VS, I changed theCopy to Output Directory to Copy always. It made no difference.
Leigh Webber