I'm creating a custom project type in Visual Studio; and currently all icons appear as placeholders. There are properties that Visual Studio requests that allow me to define the icons ( _VSHPROPID Enumeration )
__VSHPROPID.VSHPROPID_IconImgList:
__VSHPROPID.VSHPROPID_IconHandle:
__VSHPROPID.VSHPROPID_IconIndex:
In the MPF sample from Microsoft; they return the same values as me (null) for the above properties, yet the default icons (eg. .cs) appear correctly!
I've spent many hours trying to strip MPF down (it's enourmous; with many tens of thousands of lines of code) but it either continues to work; or I remove something that causes it to fail to create the new project without a useful error/stack.
It seems that in addition to implemented IVsHierarchy
, you need to implement the GetAutomationObjects
and return ProjectItem
s too.
That's how MPF and some others do it, anyway. I was unable to make it work, so I'm giving up!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.