Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Studio
  4. Templates and Solution Explorer Icons

Templates and Solution Explorer Icons

Scheduled Pinned Locked Moved Visual Studio
csharpvisual-studiowpfcomquestion
3 Posts 2 Posters 4 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Bernhard Hiller
    wrote on last edited by
    #1

    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. In C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\ItemTemplates\CSharp\Data\1033, I added (as administrator) a folder ZreprojFile, and there an icon ZreprojFile.ico, a default file ZreprojFile.zreproj, and the template proper ZreprojFile.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?

    Richard DeemingR 1 Reply Last reply
    0
    • B Bernhard Hiller

      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. In C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\ItemTemplates\CSharp\Data\1033, I added (as administrator) a folder ZreprojFile, and there an icon ZreprojFile.ico, a default file ZreprojFile.zreproj, and the template proper ZreprojFile.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?

      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #2

      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

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      B 1 Reply Last reply
      0
      • Richard DeemingR Richard Deeming

        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

        B Offline
        B Offline
        Bernhard Hiller
        wrote on last edited by
        #3

        Thanks for your solution. With such an enormous effort, I'll likely stay with the default icon...

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups