Templates and Solution Explorer Icons
-
We use Zeta Resource Editor[^] for localization. We add the
.zreproj
file to our solutions, and can open it by a double-click from the Solution Explorer (Visual Studio Professional 2015 Update 3). But the icon shown there is some "default" icon used for unknown file types. So I created a template for zreproj files. InC:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\ItemTemplates\CSharp\Data\1033
, I added (as administrator) a folderZreprojFile
, and there an iconZreprojFile.ico
, a default fileZreprojFile.zreproj
, and the template properZreprojFile.vstemplate
which is:Zreproj File Zeta Resource Editor Project ZreprojFile.ico Microsoft.CSharp.ZreprojFile CSharp 2.0 1 ZreprojFile.zreproj
ZreprojFile.zreproj
Then I installed the template. Now I can add a Zreproj to a C# solution, in the "Add - New Item" dialog the icon is shown correctly. But still: the icon in the Solution Explorer did not change. How can that be achieved?
-
We use Zeta Resource Editor[^] for localization. We add the
.zreproj
file to our solutions, and can open it by a double-click from the Solution Explorer (Visual Studio Professional 2015 Update 3). But the icon shown there is some "default" icon used for unknown file types. So I created a template for zreproj files. InC:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\ItemTemplates\CSharp\Data\1033
, I added (as administrator) a folderZreprojFile
, and there an iconZreprojFile.ico
, a default fileZreprojFile.zreproj
, and the template properZreprojFile.vstemplate
which is:Zreproj File Zeta Resource Editor Project ZreprojFile.ico Microsoft.CSharp.ZreprojFile CSharp 2.0 1 ZreprojFile.zreproj
ZreprojFile.zreproj
Then I installed the template. Now I can add a Zreproj to a C# solution, in the "Add - New Item" dialog the icon is shown correctly. But still: the icon in the Solution Explorer did not change. How can that be achieved?
As you've discovered, the icon in the template only affects the "Add new item" dialog, not the solution explorer. Changing the icons in the solution explorer is not a simple task. Mads Kristensen has published an extension[^] to add some missing file icons, but it doesn't seem to include ".zreproj" files. You could either use the option within that extension to suggest a new icon for that file type, or see if you can adapt the source of the extension[^].
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
As you've discovered, the icon in the template only affects the "Add new item" dialog, not the solution explorer. Changing the icons in the solution explorer is not a simple task. Mads Kristensen has published an extension[^] to add some missing file icons, but it doesn't seem to include ".zreproj" files. You could either use the option within that extension to suggest a new icon for that file type, or see if you can adapt the source of the extension[^].
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
Thanks for your solution. With such an enormous effort, I'll likely stay with the default icon...