4

Visual Studio template has a parameter icon to display in create project dialog. It's described as

<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Project">
<TemplateData>
 <Name Package="{AAFFDC1E-A1C7-47bc-B3DC-9E685DF3959B}" ID="202" />
 <Description Package="{AAFFDC1E-A1C7-47bc-B3DC-9E685DF3959B}" ID="203" />
 <TemplateID>Microsoft.CSharp.ActivityDesignerLibrary</TemplateID>
 <Icon Package="{b3bae735-386c-4030-8329-ef48eeda4036}" ID="4600" />

So what mean

Package="{b3bae735-386c-4030-8329-ef48eeda4036}" ID="4600"

What is package and id ? How to create BitmapSource from it ?

Json76
  • 175
  • 2
  • 13
  • Maybe you could find them in the [VS SDK](https://msdn.microsoft.com/en-us/library/bb166441.aspx). (not sure but worth a try) – Filburt May 11 '16 at 15:56
  • It must be with visual studio only, because they displayed in create new project dialog in template list. Without sdk installed. – Json76 May 11 '16 at 16:18
  • Take a look at this: [http://stackoverflow.com/a/13347178/1092181](http://stackoverflow.com/a/13347178/1092181) – Yoav Feb 13 '17 at 10:28

3 Answers3

3

For Visual Studio 2015, the CSharp project templates icons are located in ...\Microsoft Visual Studio 14.0\VC#\VCSPackages\csproj.dll enter image description here

For reference, the Visual Basic template icons are located in ...\Microsoft Visual Studio 14.0\VB\Bin\msvbprj.dll enter image description here

This is not comprehensive. For example, notice that the WPF package icons are not shown. I am Still reviewing. The icon ID 4600 is shown in the CSharp package, if this is the one you want.

Marty
  • 81
  • 1
  • 1
  • 7
1

I was looking for item template icons when I discovered this SO question.

The icon package guid is a registry key which will tell you where the icon file is located (it may also be embedded as a resource in the dll, per Marty's answer).

A quick way to find the one you want is to navigate to C:\Program Files (x86)\Microsoft Visual Studio 14.0 using windows explorer, then search for *.png.

Update: Turns out you can download the entire set of icons - Visual Studio Image Library (link to another SO answer).

Community
  • 1
  • 1
Justin
  • 501
  • 5
  • 13
0

After a lot of hair pulling, I found the WPF template icons at:

C:\Users\<you>\AppData\Local\Microsoft\VisualStudio\<version>\1033\ResourceCache.dll

Template icons for some (but not all) of my extensions were also present in this file. You can see the XNA template icons in my example below, from VS 2017.

Preview of icons inside ResourceCache.dll

These icons are all 32px, the same size that they appear in the new project wizard.

enter image description here

This is unusual, since VS's built-in template icons in csproj.dll are all at least 48px, with many reaching 256px.

I dug through every single VS-related dll I could think of and did not find any high resolution versions of the WPF template icons. Only 32px in ResourceCache.dll.

The dll's name, location, file time, and the 32px-only icons inside it strongly suggest that ResourceCache.dll is not the original source of these icons. It is entirely possible that VS is generating and caching these WPF template icons during offline VSIX operations (i.e. MEF builds), using the icons in csproj.dll as layers. The <■> on the bottom left of the App and UserControl icons would fit this bill.

Unfortunately, this is the best I could find. At least the 2012/2013 icons are so incredibly basic that they can be quickly recreated in Illustrator if a high resolution is needed.

TiberiumFusion
  • 348
  • 4
  • 17